Create virtualEventRegistration

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Create a registration record for a registrant of a webinar. This method registers the person for the webinar.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) VirtualEvent.ReadWrite Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application VirtualEventRegistration-Anon.ReadWrite.All Not available.

HTTP request

POST /solutions/virtualEvents/webinars/{webinarId}/registrations

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

In the request body, supply a JSON representation of a virtualEventRegistration object.

You can specify the following properties when you create a virtualEventRegistration with delegated permission.

Property Type Description
preferredTimezone String The registrant's time zone details. Required.
preferredLanguage String The registrant's preferred language. Required.
registrationQuestionAnswers virtualEventRegistrationQuestionAnswer collection The registrant's answer to the registration questions. Optional.

You can specify the following properties when you create a virtualEventRegistration with application permission.

Property Type Description
firstName String The registrant's first name. Required.
lastName String The registrant's last name. Required.
email String The registrant's email address. Required.
preferredTimezone String The registrant's time zone details. Required.
preferredLanguage String The registrant's preferred language. Required.
registrationQuestionAnswers virtualEventRegistrationQuestionAnswer collection The registrant's answer to the registration questions. Optional.

Response

If successful, this action returns one of the following:

  • A 201 Created response code and virtualEventRegistration object for delegated permissions.
  • A 204 No Content response code for application permissions.

Examples

Example 1: Creating registration record with delegated permission

Use delegated permission to create a registration record for a person who has a Microsoft Entra ID as a way to register a Microsoft Entra user to a webinar.

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrations
Content-Type: application/json

{
  "preferredTimezone":"Pacific Standard Time",
  "preferredLanguage":"en-us",
  "registrationQuestionAnswers": [
    {
      "questionId": "95320781-96b3-4b8f-8cf8-e6561d23447a",
      "value": null,
      "booleanValue": null,
      "multiChoiceValues": [
        "Seattle"
      ]
    },
    {
      "questionId": "4577afdb-8bee-4219-b482-04b52c6b855c",
      "value": null,
      "booleanValue": true,
      "multiChoiceValues": []
    },
    {
      "questionId": "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
      "value": null,
      "booleanValue": null,
      "multiChoiceValues": [
        "Cancun",
        "Hoboken",
        "Beijing"
      ]
    }
  ]
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.virtualEventRegistration",
  "id": "127962bb-84e1-7b62-fd98-1c9d39def7b6",
  "userId": "String",
  "firstName": "Emilee",
  "lastName": "Pham",
  "email": "EmileeMPham@contoso.com",
  "status": "registered",
  "registrationDateTime": "2023-03-07T22:04:17",
  "cancelationDateTime": null,
  "preferredTimezone":"Pacific Standard Time",
  "preferredLanguage":"en-us",
  "registrationQuestionAnswers": [
    {
      "questionId": "95320781-96b3-4b8f-8cf8-e6561d23447a",
      "displayName": "Which city do you currently work in?",
      "value": null,
      "booleanValue": null,
      "multiChoiceValues": [
        "Seattle"
      ]
    },
    {
      "questionId": "4577afdb-8bee-4219-b482-04b52c6b855c",
      "displayName": "Do you live in the same city where you work?",
      "value": null,
      "booleanValue": true,
      "multiChoiceValues": []
    },
    {
      "questionId": "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
      "displayName": "Which cities have you worked in?",
      "value": null,
      "booleanValue": null,
      "multiChoiceValues": [
        "Cancun",
        "Hoboken",
        "Beijing"
      ]
    }
  ]
}

Example 2: Creating registration record with application permission

Use application permission to create a registration record for a person who does not have a Microsoft Entra ID as a way to register an anonymous user for a webinar.

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrations
Content-Type: application/json

{
  "firstName" : "Diane",
  "lastName" : "Demoss",
  "email" : "DianeDemoss@contoso.com",
  "preferredTimezone":"Pacific Standard Time",
  "preferredLanguage":"en-us",
  "registrationQuestionAnswers": [
    {
      "questionId": "95320781-96b3-4b8f-8cf8-e6561d23447a",
      "value": null,
      "booleanValue": null,
      "multiChoiceValues": [
        "Seattle"
      ]
    },
    {
      "questionId": "4577afdb-8bee-4219-b482-04b52c6b855c",
      "value": null,
      "booleanValue": true,
      "multiChoiceValues": []
    },
    {
      "questionId": "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
      "value": null,
      "booleanValue": null,
      "multiChoiceValues": [
        "London",
        "New York City"
      ]
    }
  ]
}

Response

The following example shows the response.

HTTP/1.1 204 No Content