MeetingRegistrant を作成する
[アーティクル]
12/18/2021
3 人の共同作成者
この記事の内容
名前空間: microsoft.graph
重要
Microsoft Graph のバージョンの /beta API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 API が v1.0 で使用できるかどうかを確認するには、 バージョン セレクターを使用します。
登録者に代わって会議 登録が有効になっているオンライン 会議に会議登録者を登録します。 この操作には、次の 2 つのシナリオがあります。
meetingRegistration オブジェクト の allowedRegistrant プロパティの値が指定されている場合、登録者は会議に登録する前にサインイン organization する必要があります。 firstName **、lastName、**および 電子メールは、ユーザー (Azure Active Directory) にAzure AD。
meetingRegistration オブジェクトの allowedRegistrant プロパティの値が指定されている場合、登録者はサインインする必要はありません。匿名と everyone 見なされます。
どちらのシナリオでも、登録者は登録情報を含む電子メール通知を受け取ります。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
OnlineMeetings.ReadWrite
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
OnlineMeetings.Read.All
ヒント
meetingRegistration オブジェクト の allowedRegistrant プロパティの値がである場合は、登録者の委任されたアクセス許可を organization 使用して登録します。
meetingRegistration オブジェクト の allowedRegistrant プロパティの値がである場合は、登録者の委任されたアクセス許可を everyone 使用して登録します。
HTTP 要求
POST /users/{userId}/onlineMeetings/{id}/registration/registrants
注: userId は、 会議開催者の objectID です。
名前
説明
Authorization
ベアラー {token}。必須。
要求本文
要求本文で 、meetingRegistrant オブジェクトの編集可能なプロパティの JSON 表記を指定します。
重要
レジストリの種類を指定 するには、@odata.type プロパティを指定する必要があります。 詳細については、次の例を参照 してください 。
応答
成功した場合、このメソッドは応答コードと、応答本文の 200 OK 部分的な meetingRegistrant オブジェクトを返します。
ヒント
応答本文には、allowedRegistrant の値に応じて異 なる情報が含まれる。
allowedRegistrant プロパティの値が指定されている場合は organization 、id と joinWebUrl だけが meetingRegistrant オブジェクトに返 されます。 登録者は 、ID を使用して 登録を取り消したり 、JoinWebUrl を使用して会議に参加できます。
allowedRegistrant プロパティ の値が指定されている場合、空の everyone meetingRegistrant オブジェクト が返されます。 登録者は、受信したメール内のリンクを使用して、登録を取り消したり、会議に参加する必要があります。
例
例 1: サインインしている登録者を登録する
次の例は、会議で Registrant がに設定されているときに、登録者の委任されたアクセス許可を持つサインインしている登録者を登録する方法を示しています 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"
}
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var meetingRegistrantBase = new 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"
}
}
};
await graphClient.Users["{user-id}"].OnlineMeetings["{onlineMeeting-id}"].Registration.Registrants
.Request()
.AddAsync(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);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/16664f75-11dc-4870-bec6-38c1aaa81431/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/registrants"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphMeetingRegistrantBase *meetingRegistrantBase = [[MSGraphMeetingRegistrantBase alloc] init];
[meetingRegistrantBase setFirstName:@"Frederick"];
[meetingRegistrantBase setLastName:@"Cormier"];
[meetingRegistrantBase setEmail:@"frederick.cormier@contoso.com"];
NSMutableArray *customQuestionAnswersList = [[NSMutableArray alloc] init];
MSGraphCustomQuestionAnswer *customQuestionAnswers = [[MSGraphCustomQuestionAnswer alloc] init];
[customQuestionAnswers setQuestionId:@"MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU="];
[customQuestionAnswers setValue:@"No"];
[customQuestionAnswersList addObject: customQuestionAnswers];
MSGraphCustomQuestionAnswer *customQuestionAnswers = [[MSGraphCustomQuestionAnswer alloc] init];
[customQuestionAnswers setQuestionId:@"MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8="];
[customQuestionAnswers setValue:@"Internet"];
[customQuestionAnswersList addObject: customQuestionAnswers];
[meetingRegistrantBase setCustomQuestionAnswers:customQuestionAnswersList];
NSError *error;
NSData *meetingRegistrantBaseData = [meetingRegistrantBase getSerializedDataWithError:&error];
[urlRequest setHTTPBody:meetingRegistrantBaseData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
MeetingRegistrant meetingRegistrantBase = new MeetingRegistrant();
meetingRegistrantBase.firstName = "Frederick";
meetingRegistrantBase.lastName = "Cormier";
meetingRegistrantBase.email = "frederick.cormier@contoso.com";
LinkedList<CustomQuestionAnswer> customQuestionAnswersList = new LinkedList<CustomQuestionAnswer>();
CustomQuestionAnswer customQuestionAnswers = new CustomQuestionAnswer();
customQuestionAnswers.questionId = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=";
customQuestionAnswers.value = "No";
customQuestionAnswersList.add(customQuestionAnswers);
CustomQuestionAnswer customQuestionAnswers1 = new CustomQuestionAnswer();
customQuestionAnswers1.questionId = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=";
customQuestionAnswers1.value = "Internet";
customQuestionAnswersList.add(customQuestionAnswers1);
meetingRegistrantBase.customQuestionAnswers = customQuestionAnswersList;
graphClient.users("16664f75-11dc-4870-bec6-38c1aaa81431").onlineMeetings("MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ").registration().registrants()
.buildRequest()
.post(meetingRegistrantBase);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewMeetingRegistrant()
firstName := "Frederick"
requestBody.SetFirstName(&firstName)
lastName := "Cormier"
requestBody.SetLastName(&lastName)
email := "frederick.cormier@contoso.com"
requestBody.SetEmail(&email)
requestBody.SetCustomQuestionAnswers( []CustomQuestionAnswer {
msgraphsdk.NewCustomQuestionAnswer(),
SetAdditionalData(map[string]interface{}{
"questionId": "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
"value": "No",
}
msgraphsdk.NewCustomQuestionAnswer(),
SetAdditionalData(map[string]interface{}{
"questionId": "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
"value": "Internet",
}
}
options := &msgraphsdk.RegistrantsRequestBuilderPostOptions{
Body: requestBody,
}
userId := "user-id"
onlineMeetingId := "onlineMeeting-id"
result, err := graphClient.UsersById(&userId).OnlineMeetingsById(&onlineMeetingId).Registration().Registrants().Post(options)
応答
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: 匿名登録者を登録する
次の例は、会議で Registrant がに設定されている場合に、アプリケーションのアクセス許可を持つ匿名登録者を登録する方法を示しています 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"
}
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var meetingRegistrantBase = new 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"
}
}
};
await graphClient.Users["{user-id}"].OnlineMeetings["{onlineMeeting-id}"].Registration.Registrants
.Request()
.AddAsync(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);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/dc17674c-81d9-4adb-bfb2-8f6a442e4622/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/registrants"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphMeetingRegistrantBase *meetingRegistrantBase = [[MSGraphMeetingRegistrantBase alloc] init];
[meetingRegistrantBase setFirstName:@"Lisa"];
[meetingRegistrantBase setLastName:@"Adkins"];
[meetingRegistrantBase setEmail:@"lisa.adkins@contoso.com"];
NSMutableArray *customQuestionAnswersList = [[NSMutableArray alloc] init];
MSGraphCustomQuestionAnswer *customQuestionAnswers = [[MSGraphCustomQuestionAnswer alloc] init];
[customQuestionAnswers setQuestionId:@"MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU="];
[customQuestionAnswers setValue:@"No"];
[customQuestionAnswersList addObject: customQuestionAnswers];
MSGraphCustomQuestionAnswer *customQuestionAnswers = [[MSGraphCustomQuestionAnswer alloc] init];
[customQuestionAnswers setQuestionId:@"MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8="];
[customQuestionAnswers setValue:@"Internet"];
[customQuestionAnswersList addObject: customQuestionAnswers];
[meetingRegistrantBase setCustomQuestionAnswers:customQuestionAnswersList];
NSError *error;
NSData *meetingRegistrantBaseData = [meetingRegistrantBase getSerializedDataWithError:&error];
[urlRequest setHTTPBody:meetingRegistrantBaseData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
MeetingRegistrant meetingRegistrantBase = new MeetingRegistrant();
meetingRegistrantBase.firstName = "Lisa";
meetingRegistrantBase.lastName = "Adkins";
meetingRegistrantBase.email = "lisa.adkins@contoso.com";
LinkedList<CustomQuestionAnswer> customQuestionAnswersList = new LinkedList<CustomQuestionAnswer>();
CustomQuestionAnswer customQuestionAnswers = new CustomQuestionAnswer();
customQuestionAnswers.questionId = "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=";
customQuestionAnswers.value = "No";
customQuestionAnswersList.add(customQuestionAnswers);
CustomQuestionAnswer customQuestionAnswers1 = new CustomQuestionAnswer();
customQuestionAnswers1.questionId = "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=";
customQuestionAnswers1.value = "Internet";
customQuestionAnswersList.add(customQuestionAnswers1);
meetingRegistrantBase.customQuestionAnswers = customQuestionAnswersList;
graphClient.users("dc17674c-81d9-4adb-bfb2-8f6a442e4622").onlineMeetings("MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ").registration().registrants()
.buildRequest()
.post(meetingRegistrantBase);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewMeetingRegistrant()
firstName := "Lisa"
requestBody.SetFirstName(&firstName)
lastName := "Adkins"
requestBody.SetLastName(&lastName)
email := "lisa.adkins@contoso.com"
requestBody.SetEmail(&email)
requestBody.SetCustomQuestionAnswers( []CustomQuestionAnswer {
msgraphsdk.NewCustomQuestionAnswer(),
SetAdditionalData(map[string]interface{}{
"questionId": "MSM5YjlmM2Q4ZS03ZmVkLTRmN3gwMDIw94MDAyMF9hX3gwMDIwX2RldmU=",
"value": "No",
}
msgraphsdk.NewCustomQuestionAnswer(),
SetAdditionalData(map[string]interface{}{
"questionId": "MSM5M2E2OWQ1Ni1jZTc4LTQDAwMjBfZGlkX3gwMDIwX3lvdV94MDAyMF8=",
"value": "Internet",
}
}
options := &msgraphsdk.RegistrantsRequestBuilderPostOptions{
Body: requestBody,
}
userId := "user-id"
onlineMeetingId := "onlineMeeting-id"
result, err := graphClient.UsersById(&userId).OnlineMeetingsById(&onlineMeetingId).Registration().Registrants().Post(options)
応答
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": []
}