// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new MeetingRegistrant
{
OdataType = "#microsoft.graph.meetingRegistrant",
FirstName = "Frederick",
LastName = "Cormier",
Email = "frederick.cormier@contoso.com",
CustomQuestionAnswers = new List<CustomQuestionAnswer>
{
new CustomQuestionAnswer
{
QuestionId = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
Value = "No",
},
new CustomQuestionAnswer
{
QuestionId = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
Value = "Internet",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Users["{user-id}"].OnlineMeetings["{onlineMeeting-id}"].Registration.Registrants.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
MeetingRegistrant meetingRegistrantBase = new MeetingRegistrant();
meetingRegistrantBase.setOdataType("#microsoft.graph.meetingRegistrant");
meetingRegistrantBase.setFirstName("Frederick");
meetingRegistrantBase.setLastName("Cormier");
meetingRegistrantBase.setEmail("frederick.cormier@contoso.com");
LinkedList<CustomQuestionAnswer> customQuestionAnswers = new LinkedList<CustomQuestionAnswer>();
CustomQuestionAnswer customQuestionAnswer = new CustomQuestionAnswer();
customQuestionAnswer.setQuestionId("MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=");
customQuestionAnswer.setValue("No");
customQuestionAnswers.add(customQuestionAnswer);
CustomQuestionAnswer customQuestionAnswer1 = new CustomQuestionAnswer();
customQuestionAnswer1.setQuestionId("MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=");
customQuestionAnswer1.setValue("Internet");
customQuestionAnswers.add(customQuestionAnswer1);
meetingRegistrantBase.setCustomQuestionAnswers(customQuestionAnswers);
MeetingRegistrantBase result = graphClient.users().byUserId("{user-id}").onlineMeetings().byOnlineMeetingId("{onlineMeeting-id}").registration().registrants().post(meetingRegistrantBase);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.meeting_registrant import MeetingRegistrant
from msgraph_beta.generated.models.custom_question_answer import CustomQuestionAnswer
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MeetingRegistrant(
odata_type = "#microsoft.graph.meetingRegistrant",
first_name = "Frederick",
last_name = "Cormier",
email = "frederick.cormier@contoso.com",
custom_question_answers = [
CustomQuestionAnswer(
question_id = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
value = "No",
),
CustomQuestionAnswer(
question_id = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
value = "Internet",
),
],
)
result = await graph_client.users.by_user_id('user-id').online_meetings.by_online_meeting_id('onlineMeeting-id').registration.registrants.post(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new MeetingRegistrant
{
OdataType = "#microsoft.graph.meetingRegistrant",
FirstName = "Lisa",
LastName = "Adkins",
Email = "lisa.adkins@contoso.com",
CustomQuestionAnswers = new List<CustomQuestionAnswer>
{
new CustomQuestionAnswer
{
QuestionId = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
Value = "No",
},
new CustomQuestionAnswer
{
QuestionId = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
Value = "Internet",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Users["{user-id}"].OnlineMeetings["{onlineMeeting-id}"].Registration.Registrants.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
MeetingRegistrant meetingRegistrantBase = new MeetingRegistrant();
meetingRegistrantBase.setOdataType("#microsoft.graph.meetingRegistrant");
meetingRegistrantBase.setFirstName("Lisa");
meetingRegistrantBase.setLastName("Adkins");
meetingRegistrantBase.setEmail("lisa.adkins@contoso.com");
LinkedList<CustomQuestionAnswer> customQuestionAnswers = new LinkedList<CustomQuestionAnswer>();
CustomQuestionAnswer customQuestionAnswer = new CustomQuestionAnswer();
customQuestionAnswer.setQuestionId("MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=");
customQuestionAnswer.setValue("No");
customQuestionAnswers.add(customQuestionAnswer);
CustomQuestionAnswer customQuestionAnswer1 = new CustomQuestionAnswer();
customQuestionAnswer1.setQuestionId("MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=");
customQuestionAnswer1.setValue("Internet");
customQuestionAnswers.add(customQuestionAnswer1);
meetingRegistrantBase.setCustomQuestionAnswers(customQuestionAnswers);
MeetingRegistrantBase result = graphClient.users().byUserId("{user-id}").onlineMeetings().byOnlineMeetingId("{onlineMeeting-id}").registration().registrants().post(meetingRegistrantBase);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.meeting_registrant import MeetingRegistrant
from msgraph_beta.generated.models.custom_question_answer import CustomQuestionAnswer
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MeetingRegistrant(
odata_type = "#microsoft.graph.meetingRegistrant",
first_name = "Lisa",
last_name = "Adkins",
email = "lisa.adkins@contoso.com",
custom_question_answers = [
CustomQuestionAnswer(
question_id = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
value = "No",
),
CustomQuestionAnswer(
question_id = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
value = "Internet",
),
],
)
result = await graph_client.users.by_user_id('user-id').online_meetings.by_online_meeting_id('onlineMeeting-id').registration.registrants.post(request_body)