命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
在代表 注册人 启用了 会议注册 的联机会议中注册会议注册人。 此操作有两种方案:
- 如果 meetingRegistration 对象的
organization
allowedRegistrant 属性的值为 ,则注册者在注册会议之前需要登录。
firstName、lastName 和 email 必须与存储在 Microsoft Entra ID 中的信息匹配。
- 如果 meetingRegistration 对象的
everyone
allowedRegistrant 属性的值为 ,则注册者无需登录,并且将被视为匿名。
在任一方案中,注册者都将收到包含其注册信息的电子邮件通知。
此 API 可用于以下国家级云部署。
全局服务 |
美国政府 L4 |
美国政府 L5 (DOD) |
由世纪互联运营的中国 |
✅ |
❌ |
❌ |
❌ |
权限
为此 API 选择标记为最低特权的权限。
只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
权限类型 |
最低特权权限 |
更高特权权限 |
委派(工作或学校帐户) |
OnlineMeetings.ReadWrite |
不可用。 |
委派(个人 Microsoft 帐户) |
不支持。 |
不支持。 |
应用程序 |
OnlineMeetings.Read.All |
OnlineMeetings.ReadWrite.All |
HTTP 请求
POST /users/{userId}/onlineMeetings/{id}/registration/registrants
注意:userId
是会议组织者的 objectID 。
名称 |
说明 |
Authorization |
持有者 {token}。 必填。 详细了解 身份验证和授权。 |
请求正文
在请求正文中,提供 meetingRegistrant 对象的可编辑属性的 JSON 表示形式。
重要
必须提供 @odata.type 属性才能指定注册类型。 有关详细信息,请参阅 以下示例。
响应
如果成功,此方法在响应正文中返回响应 200 OK
代码和部分 meetingRegistrant 对象。
提示
响应正文将包含不同的信息,具体取决于 allowedRegistrant 的值。
- 如果 allowedRegistrant 属性
organization
的值为 ,则 meetingRegistrant 对象中仅返回 id 和 joinWebUrl。 注册者可以使用 ID 取消其注册或 joinWebUrl 加入会议。
- 如果 allowedRegistrant 属性
everyone
的值为 ,则将返回空 meetingRegistrant 对象。 注册者需要使用收到的电子邮件中的链接来取消注册或加入会议。
示例
示例 1:注册已登录的注册人
以下示例演示如何在会议将 allowedRegistrant 设置为 organization
时,使用注册者的委托权限注册已登录的注册者。
请求
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)
响应
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": []
}
示例 2:注册匿名注册者
以下示例演示如何在会议 allowedRegistrant 设置为 everyone
时注册具有应用程序权限的匿名注册者。
请求
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)
响应
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": []
}