POST https://graph.microsoft.com/beta/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrations
Content-Type: application/json
{
"externalRegistrationInformation": {
"referrer": "Facebook",
"registrationId": "myExternalRegistrationId"
},
"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"
]
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new VirtualEventRegistration
{
ExternalRegistrationInformation = new VirtualEventExternalRegistrationInformation
{
Referrer = "Facebook",
RegistrationId = "myExternalRegistrationId",
},
PreferredTimezone = "Pacific Standard Time",
PreferredLanguage = "en-us",
RegistrationQuestionAnswers = new List<VirtualEventRegistrationQuestionAnswer>
{
new VirtualEventRegistrationQuestionAnswer
{
QuestionId = "95320781-96b3-4b8f-8cf8-e6561d23447a",
Value = null,
BooleanValue = null,
MultiChoiceValues = new List<string>
{
"Seattle",
},
},
new VirtualEventRegistrationQuestionAnswer
{
QuestionId = "4577afdb-8bee-4219-b482-04b52c6b855c",
Value = null,
BooleanValue = true,
MultiChoiceValues = new List<string>
{
},
},
new VirtualEventRegistrationQuestionAnswer
{
QuestionId = "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
Value = null,
BooleanValue = null,
MultiChoiceValues = new List<string>
{
"Cancun",
"Hoboken",
"Beijing",
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.VirtualEvents.Webinars["{virtualEventWebinar-id}"].Registrations.PostAsync(requestBody);
mgc-beta solutions virtual-events webinars registrations create --virtual-event-webinar-id {virtualEventWebinar-id} --body '{\
"externalRegistrationInformation": {\
"referrer": "Facebook",\
"registrationId": "myExternalRegistrationId"\
},\
"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"\
]\
}\
]\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewVirtualEventRegistration()
externalRegistrationInformation := graphmodels.NewVirtualEventExternalRegistrationInformation()
referrer := "Facebook"
externalRegistrationInformation.SetReferrer(&referrer)
registrationId := "myExternalRegistrationId"
externalRegistrationInformation.SetRegistrationId(®istrationId)
requestBody.SetExternalRegistrationInformation(externalRegistrationInformation)
preferredTimezone := "Pacific Standard Time"
requestBody.SetPreferredTimezone(&preferredTimezone)
preferredLanguage := "en-us"
requestBody.SetPreferredLanguage(&preferredLanguage)
virtualEventRegistrationQuestionAnswer := graphmodels.NewVirtualEventRegistrationQuestionAnswer()
questionId := "95320781-96b3-4b8f-8cf8-e6561d23447a"
virtualEventRegistrationQuestionAnswer.SetQuestionId(&questionId)
value := null
virtualEventRegistrationQuestionAnswer.SetValue(&value)
booleanValue := null
virtualEventRegistrationQuestionAnswer.SetBooleanValue(&booleanValue)
multiChoiceValues := []string {
"Seattle",
}
virtualEventRegistrationQuestionAnswer.SetMultiChoiceValues(multiChoiceValues)
virtualEventRegistrationQuestionAnswer1 := graphmodels.NewVirtualEventRegistrationQuestionAnswer()
questionId := "4577afdb-8bee-4219-b482-04b52c6b855c"
virtualEventRegistrationQuestionAnswer1.SetQuestionId(&questionId)
value := null
virtualEventRegistrationQuestionAnswer1.SetValue(&value)
booleanValue := true
virtualEventRegistrationQuestionAnswer1.SetBooleanValue(&booleanValue)
multiChoiceValues := []string {
}
virtualEventRegistrationQuestionAnswer1.SetMultiChoiceValues(multiChoiceValues)
virtualEventRegistrationQuestionAnswer2 := graphmodels.NewVirtualEventRegistrationQuestionAnswer()
questionId := "80fefcf1-caf7-4cd3-b8d7-159e17c47f20"
virtualEventRegistrationQuestionAnswer2.SetQuestionId(&questionId)
value := null
virtualEventRegistrationQuestionAnswer2.SetValue(&value)
booleanValue := null
virtualEventRegistrationQuestionAnswer2.SetBooleanValue(&booleanValue)
multiChoiceValues := []string {
"Cancun",
"Hoboken",
"Beijing",
}
virtualEventRegistrationQuestionAnswer2.SetMultiChoiceValues(multiChoiceValues)
registrationQuestionAnswers := []graphmodels.VirtualEventRegistrationQuestionAnswerable {
virtualEventRegistrationQuestionAnswer,
virtualEventRegistrationQuestionAnswer1,
virtualEventRegistrationQuestionAnswer2,
}
requestBody.SetRegistrationQuestionAnswers(registrationQuestionAnswers)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
registrations, err := graphClient.Solutions().VirtualEvents().Webinars().ByVirtualEventWebinarId("virtualEventWebinar-id").Registrations().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VirtualEventRegistration virtualEventRegistration = new VirtualEventRegistration();
VirtualEventExternalRegistrationInformation externalRegistrationInformation = new VirtualEventExternalRegistrationInformation();
externalRegistrationInformation.setReferrer("Facebook");
externalRegistrationInformation.setRegistrationId("myExternalRegistrationId");
virtualEventRegistration.setExternalRegistrationInformation(externalRegistrationInformation);
virtualEventRegistration.setPreferredTimezone("Pacific Standard Time");
virtualEventRegistration.setPreferredLanguage("en-us");
LinkedList<VirtualEventRegistrationQuestionAnswer> registrationQuestionAnswers = new LinkedList<VirtualEventRegistrationQuestionAnswer>();
VirtualEventRegistrationQuestionAnswer virtualEventRegistrationQuestionAnswer = new VirtualEventRegistrationQuestionAnswer();
virtualEventRegistrationQuestionAnswer.setQuestionId("95320781-96b3-4b8f-8cf8-e6561d23447a");
virtualEventRegistrationQuestionAnswer.setValue(null);
virtualEventRegistrationQuestionAnswer.setBooleanValue(null);
LinkedList<String> multiChoiceValues = new LinkedList<String>();
multiChoiceValues.add("Seattle");
virtualEventRegistrationQuestionAnswer.setMultiChoiceValues(multiChoiceValues);
registrationQuestionAnswers.add(virtualEventRegistrationQuestionAnswer);
VirtualEventRegistrationQuestionAnswer virtualEventRegistrationQuestionAnswer1 = new VirtualEventRegistrationQuestionAnswer();
virtualEventRegistrationQuestionAnswer1.setQuestionId("4577afdb-8bee-4219-b482-04b52c6b855c");
virtualEventRegistrationQuestionAnswer1.setValue(null);
virtualEventRegistrationQuestionAnswer1.setBooleanValue(true);
LinkedList<String> multiChoiceValues1 = new LinkedList<String>();
virtualEventRegistrationQuestionAnswer1.setMultiChoiceValues(multiChoiceValues1);
registrationQuestionAnswers.add(virtualEventRegistrationQuestionAnswer1);
VirtualEventRegistrationQuestionAnswer virtualEventRegistrationQuestionAnswer2 = new VirtualEventRegistrationQuestionAnswer();
virtualEventRegistrationQuestionAnswer2.setQuestionId("80fefcf1-caf7-4cd3-b8d7-159e17c47f20");
virtualEventRegistrationQuestionAnswer2.setValue(null);
virtualEventRegistrationQuestionAnswer2.setBooleanValue(null);
LinkedList<String> multiChoiceValues2 = new LinkedList<String>();
multiChoiceValues2.add("Cancun");
multiChoiceValues2.add("Hoboken");
multiChoiceValues2.add("Beijing");
virtualEventRegistrationQuestionAnswer2.setMultiChoiceValues(multiChoiceValues2);
registrationQuestionAnswers.add(virtualEventRegistrationQuestionAnswer2);
virtualEventRegistration.setRegistrationQuestionAnswers(registrationQuestionAnswers);
VirtualEventRegistration result = graphClient.solutions().virtualEvents().webinars().byVirtualEventWebinarId("{virtualEventWebinar-id}").registrations().post(virtualEventRegistration);
const options = {
authProvider,
};
const client = Client.init(options);
const virtualEventRegistration = {
externalRegistrationInformation: {
referrer: 'Facebook',
registrationId: 'myExternalRegistrationId'
},
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'
]
}
]
};
await client.api('/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrations')
.version('beta')
.post(virtualEventRegistration);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\VirtualEventRegistration;
use Microsoft\Graph\Beta\Generated\Models\VirtualEventExternalRegistrationInformation;
use Microsoft\Graph\Beta\Generated\Models\VirtualEventRegistrationQuestionAnswer;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new VirtualEventRegistration();
$externalRegistrationInformation = new VirtualEventExternalRegistrationInformation();
$externalRegistrationInformation->setReferrer('Facebook');
$externalRegistrationInformation->setRegistrationId('myExternalRegistrationId');
$requestBody->setExternalRegistrationInformation($externalRegistrationInformation);
$requestBody->setPreferredTimezone('Pacific Standard Time');
$requestBody->setPreferredLanguage('en-us');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1 = new VirtualEventRegistrationQuestionAnswer();
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setQuestionId('95320781-96b3-4b8f-8cf8-e6561d23447a');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setBooleanValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setMultiChoiceValues(['Seattle', ]);
$registrationQuestionAnswersArray []= $registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1;
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2 = new VirtualEventRegistrationQuestionAnswer();
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setQuestionId('4577afdb-8bee-4219-b482-04b52c6b855c');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setBooleanValue(true);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setMultiChoiceValues([ ]);
$registrationQuestionAnswersArray []= $registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2;
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3 = new VirtualEventRegistrationQuestionAnswer();
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setQuestionId('80fefcf1-caf7-4cd3-b8d7-159e17c47f20');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setBooleanValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setMultiChoiceValues(['Cancun', 'Hoboken', 'Beijing', ]);
$registrationQuestionAnswersArray []= $registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3;
$requestBody->setRegistrationQuestionAnswers($registrationQuestionAnswersArray);
$result = $graphServiceClient->solutions()->virtualEvents()->webinars()->byVirtualEventWebinarId('virtualEventWebinar-id')->registrations()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Bookings
$params = @{
externalRegistrationInformation = @{
referrer = "Facebook"
registrationId = "myExternalRegistrationId"
}
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"
)
}
)
}
New-MgBetaVirtualEventWebinarRegistration -VirtualEventWebinarId $virtualEventWebinarId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.virtual_event_registration import VirtualEventRegistration
from msgraph_beta.generated.models.virtual_event_external_registration_information import VirtualEventExternalRegistrationInformation
from msgraph_beta.generated.models.virtual_event_registration_question_answer import VirtualEventRegistrationQuestionAnswer
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = VirtualEventRegistration(
external_registration_information = VirtualEventExternalRegistrationInformation(
referrer = "Facebook",
registration_id = "myExternalRegistrationId",
),
preferred_timezone = "Pacific Standard Time",
preferred_language = "en-us",
registration_question_answers = [
VirtualEventRegistrationQuestionAnswer(
question_id = "95320781-96b3-4b8f-8cf8-e6561d23447a",
value = None,
boolean_value = None,
multi_choice_values = [
"Seattle",
],
),
VirtualEventRegistrationQuestionAnswer(
question_id = "4577afdb-8bee-4219-b482-04b52c6b855c",
value = None,
boolean_value = True,
multi_choice_values = [
],
),
VirtualEventRegistrationQuestionAnswer(
question_id = "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
value = None,
boolean_value = None,
multi_choice_values = [
"Cancun",
"Hoboken",
"Beijing",
],
),
],
)
result = await graph_client.solutions.virtual_events.webinars.by_virtual_event_webinar_id('virtualEventWebinar-id').registrations.post(request_body)
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",
"externalRegistrationInformation": {
"referrer": "Facebook",
"registrationId": "myExternalRegistrationId"
},
"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"
]
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new VirtualEventRegistration
{
FirstName = "Diane",
LastName = "Demoss",
Email = "DianeDemoss@contoso.com",
ExternalRegistrationInformation = new VirtualEventExternalRegistrationInformation
{
Referrer = "Facebook",
RegistrationId = "myExternalRegistrationId",
},
PreferredTimezone = "Pacific Standard Time",
PreferredLanguage = "en-us",
RegistrationQuestionAnswers = new List<VirtualEventRegistrationQuestionAnswer>
{
new VirtualEventRegistrationQuestionAnswer
{
QuestionId = "95320781-96b3-4b8f-8cf8-e6561d23447a",
Value = null,
BooleanValue = null,
MultiChoiceValues = new List<string>
{
"Seattle",
},
},
new VirtualEventRegistrationQuestionAnswer
{
QuestionId = "4577afdb-8bee-4219-b482-04b52c6b855c",
Value = null,
BooleanValue = true,
MultiChoiceValues = new List<string>
{
},
},
new VirtualEventRegistrationQuestionAnswer
{
QuestionId = "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
Value = null,
BooleanValue = null,
MultiChoiceValues = new List<string>
{
"London",
"New York City",
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.VirtualEvents.Webinars["{virtualEventWebinar-id}"].Registrations.PostAsync(requestBody);
mgc-beta solutions virtual-events webinars registrations create --virtual-event-webinar-id {virtualEventWebinar-id} --body '{\
"firstName" : "Diane",\
"lastName" : "Demoss",\
"email" : "DianeDemoss@contoso.com",\
"externalRegistrationInformation": {\
"referrer": "Facebook",\
"registrationId": "myExternalRegistrationId"\
},\
"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"\
]\
}\
]\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewVirtualEventRegistration()
firstName := "Diane"
requestBody.SetFirstName(&firstName)
lastName := "Demoss"
requestBody.SetLastName(&lastName)
email := "DianeDemoss@contoso.com"
requestBody.SetEmail(&email)
externalRegistrationInformation := graphmodels.NewVirtualEventExternalRegistrationInformation()
referrer := "Facebook"
externalRegistrationInformation.SetReferrer(&referrer)
registrationId := "myExternalRegistrationId"
externalRegistrationInformation.SetRegistrationId(®istrationId)
requestBody.SetExternalRegistrationInformation(externalRegistrationInformation)
preferredTimezone := "Pacific Standard Time"
requestBody.SetPreferredTimezone(&preferredTimezone)
preferredLanguage := "en-us"
requestBody.SetPreferredLanguage(&preferredLanguage)
virtualEventRegistrationQuestionAnswer := graphmodels.NewVirtualEventRegistrationQuestionAnswer()
questionId := "95320781-96b3-4b8f-8cf8-e6561d23447a"
virtualEventRegistrationQuestionAnswer.SetQuestionId(&questionId)
value := null
virtualEventRegistrationQuestionAnswer.SetValue(&value)
booleanValue := null
virtualEventRegistrationQuestionAnswer.SetBooleanValue(&booleanValue)
multiChoiceValues := []string {
"Seattle",
}
virtualEventRegistrationQuestionAnswer.SetMultiChoiceValues(multiChoiceValues)
virtualEventRegistrationQuestionAnswer1 := graphmodels.NewVirtualEventRegistrationQuestionAnswer()
questionId := "4577afdb-8bee-4219-b482-04b52c6b855c"
virtualEventRegistrationQuestionAnswer1.SetQuestionId(&questionId)
value := null
virtualEventRegistrationQuestionAnswer1.SetValue(&value)
booleanValue := true
virtualEventRegistrationQuestionAnswer1.SetBooleanValue(&booleanValue)
multiChoiceValues := []string {
}
virtualEventRegistrationQuestionAnswer1.SetMultiChoiceValues(multiChoiceValues)
virtualEventRegistrationQuestionAnswer2 := graphmodels.NewVirtualEventRegistrationQuestionAnswer()
questionId := "80fefcf1-caf7-4cd3-b8d7-159e17c47f20"
virtualEventRegistrationQuestionAnswer2.SetQuestionId(&questionId)
value := null
virtualEventRegistrationQuestionAnswer2.SetValue(&value)
booleanValue := null
virtualEventRegistrationQuestionAnswer2.SetBooleanValue(&booleanValue)
multiChoiceValues := []string {
"London",
"New York City",
}
virtualEventRegistrationQuestionAnswer2.SetMultiChoiceValues(multiChoiceValues)
registrationQuestionAnswers := []graphmodels.VirtualEventRegistrationQuestionAnswerable {
virtualEventRegistrationQuestionAnswer,
virtualEventRegistrationQuestionAnswer1,
virtualEventRegistrationQuestionAnswer2,
}
requestBody.SetRegistrationQuestionAnswers(registrationQuestionAnswers)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
registrations, err := graphClient.Solutions().VirtualEvents().Webinars().ByVirtualEventWebinarId("virtualEventWebinar-id").Registrations().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VirtualEventRegistration virtualEventRegistration = new VirtualEventRegistration();
virtualEventRegistration.setFirstName("Diane");
virtualEventRegistration.setLastName("Demoss");
virtualEventRegistration.setEmail("DianeDemoss@contoso.com");
VirtualEventExternalRegistrationInformation externalRegistrationInformation = new VirtualEventExternalRegistrationInformation();
externalRegistrationInformation.setReferrer("Facebook");
externalRegistrationInformation.setRegistrationId("myExternalRegistrationId");
virtualEventRegistration.setExternalRegistrationInformation(externalRegistrationInformation);
virtualEventRegistration.setPreferredTimezone("Pacific Standard Time");
virtualEventRegistration.setPreferredLanguage("en-us");
LinkedList<VirtualEventRegistrationQuestionAnswer> registrationQuestionAnswers = new LinkedList<VirtualEventRegistrationQuestionAnswer>();
VirtualEventRegistrationQuestionAnswer virtualEventRegistrationQuestionAnswer = new VirtualEventRegistrationQuestionAnswer();
virtualEventRegistrationQuestionAnswer.setQuestionId("95320781-96b3-4b8f-8cf8-e6561d23447a");
virtualEventRegistrationQuestionAnswer.setValue(null);
virtualEventRegistrationQuestionAnswer.setBooleanValue(null);
LinkedList<String> multiChoiceValues = new LinkedList<String>();
multiChoiceValues.add("Seattle");
virtualEventRegistrationQuestionAnswer.setMultiChoiceValues(multiChoiceValues);
registrationQuestionAnswers.add(virtualEventRegistrationQuestionAnswer);
VirtualEventRegistrationQuestionAnswer virtualEventRegistrationQuestionAnswer1 = new VirtualEventRegistrationQuestionAnswer();
virtualEventRegistrationQuestionAnswer1.setQuestionId("4577afdb-8bee-4219-b482-04b52c6b855c");
virtualEventRegistrationQuestionAnswer1.setValue(null);
virtualEventRegistrationQuestionAnswer1.setBooleanValue(true);
LinkedList<String> multiChoiceValues1 = new LinkedList<String>();
virtualEventRegistrationQuestionAnswer1.setMultiChoiceValues(multiChoiceValues1);
registrationQuestionAnswers.add(virtualEventRegistrationQuestionAnswer1);
VirtualEventRegistrationQuestionAnswer virtualEventRegistrationQuestionAnswer2 = new VirtualEventRegistrationQuestionAnswer();
virtualEventRegistrationQuestionAnswer2.setQuestionId("80fefcf1-caf7-4cd3-b8d7-159e17c47f20");
virtualEventRegistrationQuestionAnswer2.setValue(null);
virtualEventRegistrationQuestionAnswer2.setBooleanValue(null);
LinkedList<String> multiChoiceValues2 = new LinkedList<String>();
multiChoiceValues2.add("London");
multiChoiceValues2.add("New York City");
virtualEventRegistrationQuestionAnswer2.setMultiChoiceValues(multiChoiceValues2);
registrationQuestionAnswers.add(virtualEventRegistrationQuestionAnswer2);
virtualEventRegistration.setRegistrationQuestionAnswers(registrationQuestionAnswers);
VirtualEventRegistration result = graphClient.solutions().virtualEvents().webinars().byVirtualEventWebinarId("{virtualEventWebinar-id}").registrations().post(virtualEventRegistration);
const options = {
authProvider,
};
const client = Client.init(options);
const virtualEventRegistration = {
firstName: 'Diane',
lastName: 'Demoss',
email: 'DianeDemoss@contoso.com',
externalRegistrationInformation: {
referrer: 'Facebook',
registrationId: 'myExternalRegistrationId'
},
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'
]
}
]
};
await client.api('/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrations')
.version('beta')
.post(virtualEventRegistration);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\VirtualEventRegistration;
use Microsoft\Graph\Beta\Generated\Models\VirtualEventExternalRegistrationInformation;
use Microsoft\Graph\Beta\Generated\Models\VirtualEventRegistrationQuestionAnswer;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new VirtualEventRegistration();
$requestBody->setFirstName('Diane');
$requestBody->setLastName('Demoss');
$requestBody->setEmail('DianeDemoss@contoso.com');
$externalRegistrationInformation = new VirtualEventExternalRegistrationInformation();
$externalRegistrationInformation->setReferrer('Facebook');
$externalRegistrationInformation->setRegistrationId('myExternalRegistrationId');
$requestBody->setExternalRegistrationInformation($externalRegistrationInformation);
$requestBody->setPreferredTimezone('Pacific Standard Time');
$requestBody->setPreferredLanguage('en-us');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1 = new VirtualEventRegistrationQuestionAnswer();
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setQuestionId('95320781-96b3-4b8f-8cf8-e6561d23447a');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setBooleanValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1->setMultiChoiceValues(['Seattle', ]);
$registrationQuestionAnswersArray []= $registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer1;
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2 = new VirtualEventRegistrationQuestionAnswer();
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setQuestionId('4577afdb-8bee-4219-b482-04b52c6b855c');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setBooleanValue(true);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2->setMultiChoiceValues([ ]);
$registrationQuestionAnswersArray []= $registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer2;
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3 = new VirtualEventRegistrationQuestionAnswer();
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setQuestionId('80fefcf1-caf7-4cd3-b8d7-159e17c47f20');
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setBooleanValue(null);
$registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3->setMultiChoiceValues(['London', 'New York City', ]);
$registrationQuestionAnswersArray []= $registrationQuestionAnswersVirtualEventRegistrationQuestionAnswer3;
$requestBody->setRegistrationQuestionAnswers($registrationQuestionAnswersArray);
$result = $graphServiceClient->solutions()->virtualEvents()->webinars()->byVirtualEventWebinarId('virtualEventWebinar-id')->registrations()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Bookings
$params = @{
firstName = "Diane"
lastName = "Demoss"
email = "DianeDemoss@contoso.com"
externalRegistrationInformation = @{
referrer = "Facebook"
registrationId = "myExternalRegistrationId"
}
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"
)
}
)
}
New-MgBetaVirtualEventWebinarRegistration -VirtualEventWebinarId $virtualEventWebinarId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.virtual_event_registration import VirtualEventRegistration
from msgraph_beta.generated.models.virtual_event_external_registration_information import VirtualEventExternalRegistrationInformation
from msgraph_beta.generated.models.virtual_event_registration_question_answer import VirtualEventRegistrationQuestionAnswer
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = VirtualEventRegistration(
first_name = "Diane",
last_name = "Demoss",
email = "DianeDemoss@contoso.com",
external_registration_information = VirtualEventExternalRegistrationInformation(
referrer = "Facebook",
registration_id = "myExternalRegistrationId",
),
preferred_timezone = "Pacific Standard Time",
preferred_language = "en-us",
registration_question_answers = [
VirtualEventRegistrationQuestionAnswer(
question_id = "95320781-96b3-4b8f-8cf8-e6561d23447a",
value = None,
boolean_value = None,
multi_choice_values = [
"Seattle",
],
),
VirtualEventRegistrationQuestionAnswer(
question_id = "4577afdb-8bee-4219-b482-04b52c6b855c",
value = None,
boolean_value = True,
multi_choice_values = [
],
),
VirtualEventRegistrationQuestionAnswer(
question_id = "80fefcf1-caf7-4cd3-b8d7-159e17c47f20",
value = None,
boolean_value = None,
multi_choice_values = [
"London",
"New York City",
],
),
],
)
result = await graph_client.solutions.virtual_events.webinars.by_virtual_event_webinar_id('virtualEventWebinar-id').registrations.post(request_body)