Namespace: microsoft.graph
Importante
As APIs na versão /beta
no Microsoft Graph estão sujeitas a alterações. Não há suporte para o uso dessas APIs em aplicativos de produção. Para determinar se uma API está disponível na v1.0, use o seletor Versão.
Inscrever um registo de reunião numa reunião online que tenha o registo da reunião ativado em nome do registo. Esta operação tem dois cenários:
- Se o valor da propriedade allowedRegistrant do objeto meetingRegistration for
organization
, os registos terão de iniciar sessão antes de se registarem na reunião. O firstName, o lastName e o e-mail têm de corresponder às informações armazenadas no Microsoft Entra ID.
- Se o valor da propriedade allowedRegistrant do objeto meetingRegistration for
everyone
, os registos não terão de iniciar sessão e serão considerados anónimos.
Em qualquer um dos cenários, o registo receberá uma notificação por e-mail que contém as respetivas informações de registo.
Esta API está disponível nas seguintes implementações de cloud nacionais.
Serviço global |
US Government L4 |
US Government L5 (DOD) |
China operada pela 21Vianet |
✅ |
❌ |
❌ |
❌ |
Permissões
Escolha a permissão ou permissões marcadas como menos privilegiadas para esta API. Utilize uma permissão ou permissões com privilégios mais elevados apenas se a sua aplicação o exigir. Para obter detalhes sobre as permissões delegadas e de aplicação, veja Tipos de permissão. Para saber mais sobre estas permissões, veja a referência de permissões.
Tipo de permissão |
Permissões com menos privilégios |
Permissões com privilégios superiores |
Delegado (conta corporativa ou de estudante) |
OnlineMeetings.ReadWrite |
Indisponível. |
Delegado (conta pessoal da Microsoft) |
Sem suporte. |
Sem suporte. |
Application |
OnlineMeetings.Read.All |
OnlineMeetings.ReadWrite.All |
Dica
- Se o valor da propriedade allowedRegistrant do objeto meetingRegistration for
organization
, utilize a permissão delegada do registo para se inscrever.
- Se o valor da propriedade allowedRegistrant do objeto meetingRegistration for
everyone
, utilize a permissão delegada do registo para se inscrever.
Solicitação HTTP
POST /users/{userId}/onlineMeetings/{id}/registration/registrants
Nota:userId
é o objectID do organizador da reunião.
Corpo da solicitação
No corpo do pedido, forneça uma representação JSON das propriedades editáveis de um objeto meetingRegistrant .
Importante
Tem de fornecer a propriedade @odata.type para especificar o tipo de registo. Para obter mais detalhes, veja o seguinte exemplo.
Resposta
Se for bem-sucedido, este método devolve um 200 OK
código de resposta e um objeto meetingRegistrant parcial no corpo da resposta.
Dica
O corpo da resposta conterá informações diferentes consoante o valor de allowedRegistrant.
- Se o valor da propriedade allowedRegistrant for
organization
, apenas id e joinWebUrl serão devolvidos no objeto meetingRegistrant . Os registos podem utilizar o ID para cancelar o registo ou aderir aWebUrl para participar na reunião.
- Se o valor da propriedade allowedRegistrant for
everyone
, será devolvido um objeto meetingRegistrant vazio. Os registos têm de utilizar as ligações no e-mail que recebem para cancelar o registo ou participar na reunião.
Exemplos
Exemplo 1: Inscrever um registo com sessão iniciada
O exemplo seguinte mostra como inscrever um registo com sessão iniciada com a permissão delegada do registo quando a reunião tiver permitidoRegistrant definido como organization
.
Solicitação
POST https://graph.microsoft.com/beta/users/16664f75-11dc-4870-bec6-38c1aaa81431/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/registrants
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.meetingRegistrant",
"firstName": "Frederick",
"lastName": "Cormier",
"email": "frederick.cormier@contoso.com",
"customQuestionAnswers": [
{
"questionId": "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
"value": "No"
},
{
"questionId": "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
"value": "Internet"
}
]
}
// 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);
mgc-beta users online-meetings registration registrants create --user-id {user-id} --online-meeting-id {onlineMeeting-id} --body '{\
"@odata.type": "#microsoft.graph.meetingRegistrant",\
"firstName": "Frederick",\
"lastName": "Cormier",\
"email": "frederick.cormier@contoso.com",\
"customQuestionAnswers": [\
{\
"questionId": "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",\
"value": "No"\
},\
{\
"questionId": "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",\
"value": "Internet"\
}\
]\
}\
'
// 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.NewMeetingRegistrantBase()
firstName := "Frederick"
requestBody.SetFirstName(&firstName)
lastName := "Cormier"
requestBody.SetLastName(&lastName)
email := "frederick.cormier@contoso.com"
requestBody.SetEmail(&email)
customQuestionAnswer := graphmodels.NewCustomQuestionAnswer()
questionId := "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU="
customQuestionAnswer.SetQuestionId(&questionId)
value := "No"
customQuestionAnswer.SetValue(&value)
customQuestionAnswer1 := graphmodels.NewCustomQuestionAnswer()
questionId := "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8="
customQuestionAnswer1.SetQuestionId(&questionId)
value := "Internet"
customQuestionAnswer1.SetValue(&value)
customQuestionAnswers := []graphmodels.CustomQuestionAnswerable {
customQuestionAnswer,
customQuestionAnswer1,
}
requestBody.SetCustomQuestionAnswers(customQuestionAnswers)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
registrants, err := graphClient.Users().ByUserId("user-id").OnlineMeetings().ByOnlineMeetingId("onlineMeeting-id").Registration().Registrants().Post(context.Background(), requestBody, nil)
// 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);
const options = {
authProvider,
};
const client = Client.init(options);
const meetingRegistrantBase = {
'@odata.type': '#microsoft.graph.meetingRegistrant',
firstName: 'Frederick',
lastName: 'Cormier',
email: 'frederick.cormier@contoso.com',
customQuestionAnswers: [
{
questionId: 'MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=',
value: 'No'
},
{
questionId: 'MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=',
value: 'Internet'
}
]
};
await client.api('/users/16664f75-11dc-4870-bec6-38c1aaa81431/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/registrants')
.version('beta')
.post(meetingRegistrantBase);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\MeetingRegistrant;
use Microsoft\Graph\Beta\Generated\Models\CustomQuestionAnswer;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MeetingRegistrant();
$requestBody->setOdataType('#microsoft.graph.meetingRegistrant');
$requestBody->setFirstName('Frederick');
$requestBody->setLastName('Cormier');
$requestBody->setEmail('frederick.cormier@contoso.com');
$customQuestionAnswersCustomQuestionAnswer1 = new CustomQuestionAnswer();
$customQuestionAnswersCustomQuestionAnswer1->setQuestionId('MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=');
$customQuestionAnswersCustomQuestionAnswer1->setValue('No');
$customQuestionAnswersArray []= $customQuestionAnswersCustomQuestionAnswer1;
$customQuestionAnswersCustomQuestionAnswer2 = new CustomQuestionAnswer();
$customQuestionAnswersCustomQuestionAnswer2->setQuestionId('MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=');
$customQuestionAnswersCustomQuestionAnswer2->setValue('Internet');
$customQuestionAnswersArray []= $customQuestionAnswersCustomQuestionAnswer2;
$requestBody->setCustomQuestionAnswers($customQuestionAnswersArray);
$result = $graphServiceClient->users()->byUserId('user-id')->onlineMeetings()->byOnlineMeetingId('onlineMeeting-id')->registration()->registrants()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
"@odata.type" = "#microsoft.graph.meetingRegistrant"
firstName = "Frederick"
lastName = "Cormier"
email = "frederick.cormier@contoso.com"
customQuestionAnswers = @(
@{
questionId = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU="
value = "No"
}
@{
questionId = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8="
value = "Internet"
}
)
}
New-MgBetaUserOnlineMeetingRegistrationRegistrant -UserId $userId -OnlineMeetingId $onlineMeetingId -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.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)
Resposta
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('16664f75-11dc-4870-bec6-38c1aaa81431')/onlineMeetings('MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ')/registration/registrants/$entity",
"@odata.type": "#microsoft.graph.meetingRegistrant",
"id": "gWWckDBR6UOI8_yzWCzeNw,6pAAiSU1bkGqzLnbHG_muA,bzLh6uR-5EGYsCvtvIvs6Q,E4jbleVFdE6BDf6ei3YBOA,KvXQzK4zfU-5LQj_ZLWgow,A7_SArco00S-Qr707l0vBA,UFakyZrk1K9vBacExW1muA",
"registrationDateTime": null,
"joinWebUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_MmE4Mzg1OTItYjg2Ni00ZmNmLWI5NjMtODNkZDJiMWNlNTVi%40thread.v2/0?context=%7b%22Tid%22%3a%22909c6581-5131-43e9-88f3-fcb3582cde37%22%2c%22Oid%22%3a%22dc17674c-81d9-4adb-bfb2-8f6a442e4622%22%2c%22prid%22%3a%22gWWckDBR6UOI8_yzWCzeNw%2c6pAAiSa1bkGqzLnbHG_muA%2cbzLh6uR-5EGdsCvtvIvs6Q%2cE4jbleVFdE6BDf6ei3YBOA%2cKvXQzK4zfU-5LQj_ZLWgow%2cA7_SArco00S-Qr707l0vBA%2cUFaiyZrk1K9vBacExW1muA%22%2c%22isPublic%22%3afalse%7d",
"firstName": null,
"lastName": null,
"email": null,
"status": null,
"customQuestionAnswers": []
}
Exemplo 2: Inscrever um registo anónimo
O exemplo seguinte mostra como inscrever um registo anónimo com permissão de aplicação quando a reunião tiver permitidoRegistrant definido como everyone
.
Solicitação
POST https://graph.microsoft.com/beta/users/dc17674c-81d9-4adb-bfb2-8f6a442e4622/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/registrants
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.meetingRegistrant",
"firstName": "Lisa",
"lastName": "Adkins",
"email": "lisa.adkins@contoso.com",
"customQuestionAnswers": [
{
"questionId": "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
"value": "No"
},
{
"questionId": "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
"value": "Internet"
}
]
}
// 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);
mgc-beta users online-meetings registration registrants create --user-id {user-id} --online-meeting-id {onlineMeeting-id} --body '{\
"@odata.type": "#microsoft.graph.meetingRegistrant",\
"firstName": "Lisa",\
"lastName": "Adkins",\
"email": "lisa.adkins@contoso.com",\
"customQuestionAnswers": [\
{\
"questionId": "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",\
"value": "No"\
},\
{\
"questionId": "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",\
"value": "Internet"\
}\
]\
}\
'
// 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.NewMeetingRegistrantBase()
firstName := "Lisa"
requestBody.SetFirstName(&firstName)
lastName := "Adkins"
requestBody.SetLastName(&lastName)
email := "lisa.adkins@contoso.com"
requestBody.SetEmail(&email)
customQuestionAnswer := graphmodels.NewCustomQuestionAnswer()
questionId := "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU="
customQuestionAnswer.SetQuestionId(&questionId)
value := "No"
customQuestionAnswer.SetValue(&value)
customQuestionAnswer1 := graphmodels.NewCustomQuestionAnswer()
questionId := "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8="
customQuestionAnswer1.SetQuestionId(&questionId)
value := "Internet"
customQuestionAnswer1.SetValue(&value)
customQuestionAnswers := []graphmodels.CustomQuestionAnswerable {
customQuestionAnswer,
customQuestionAnswer1,
}
requestBody.SetCustomQuestionAnswers(customQuestionAnswers)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
registrants, err := graphClient.Users().ByUserId("user-id").OnlineMeetings().ByOnlineMeetingId("onlineMeeting-id").Registration().Registrants().Post(context.Background(), requestBody, nil)
// 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);
const options = {
authProvider,
};
const client = Client.init(options);
const meetingRegistrantBase = {
'@odata.type': '#microsoft.graph.meetingRegistrant',
firstName: 'Lisa',
lastName: 'Adkins',
email: 'lisa.adkins@contoso.com',
customQuestionAnswers: [
{
questionId: 'MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=',
value: 'No'
},
{
questionId: 'MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=',
value: 'Internet'
}
]
};
await client.api('/users/dc17674c-81d9-4adb-bfb2-8f6a442e4622/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/registrants')
.version('beta')
.post(meetingRegistrantBase);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\MeetingRegistrant;
use Microsoft\Graph\Beta\Generated\Models\CustomQuestionAnswer;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MeetingRegistrant();
$requestBody->setOdataType('#microsoft.graph.meetingRegistrant');
$requestBody->setFirstName('Lisa');
$requestBody->setLastName('Adkins');
$requestBody->setEmail('lisa.adkins@contoso.com');
$customQuestionAnswersCustomQuestionAnswer1 = new CustomQuestionAnswer();
$customQuestionAnswersCustomQuestionAnswer1->setQuestionId('MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=');
$customQuestionAnswersCustomQuestionAnswer1->setValue('No');
$customQuestionAnswersArray []= $customQuestionAnswersCustomQuestionAnswer1;
$customQuestionAnswersCustomQuestionAnswer2 = new CustomQuestionAnswer();
$customQuestionAnswersCustomQuestionAnswer2->setQuestionId('MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=');
$customQuestionAnswersCustomQuestionAnswer2->setValue('Internet');
$customQuestionAnswersArray []= $customQuestionAnswersCustomQuestionAnswer2;
$requestBody->setCustomQuestionAnswers($customQuestionAnswersArray);
$result = $graphServiceClient->users()->byUserId('user-id')->onlineMeetings()->byOnlineMeetingId('onlineMeeting-id')->registration()->registrants()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
"@odata.type" = "#microsoft.graph.meetingRegistrant"
firstName = "Lisa"
lastName = "Adkins"
email = "lisa.adkins@contoso.com"
customQuestionAnswers = @(
@{
questionId = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU="
value = "No"
}
@{
questionId = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8="
value = "Internet"
}
)
}
New-MgBetaUserOnlineMeetingRegistrationRegistrant -UserId $userId -OnlineMeetingId $onlineMeetingId -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.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)
Resposta
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('16664f75-11dc-4870-bec6-38c1aaa81431')/onlineMeetings('MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ')/registration/registrants/$entity",
"@odata.type": "#microsoft.graph.meetingRegistrant",
"id": "",
"registrationDateTime": null,
"joinWebUrl": "",
"firstName": null,
"lastName": null,
"email": null,
"status": null,
"customQuestionAnswers": []
}