参与者:邀请
本文内容
命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
邀请参与者加入活动呼叫。
有关如何处理操作的详细信息,请参阅 commsOperation 。
注意: 仅组呼叫支持在一个请求中邀请多个参与者。
此 API 可用于以下国家级云部署 。
全局服务
美国政府 L4
美国政府 L5 (DOD)
由世纪互联运营的中国
✅
❌
❌
❌
权限
为此 API 选择标记为最低特权的权限。 只有在应用需要它时 ,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型 。 要了解有关这些权限的详细信息,请参阅 权限参考 。
权限类型
最低特权权限
更高特权权限
委派(工作或学校帐户)
不支持。
不支持。
委派(个人 Microsoft 帐户)
不支持。
不支持。
应用程序
Calls.InitiateGroupCall.All
不可用。
HTTP 请求
POST /app/calls/{id}/participants/invite
POST /communications/calls/{id}/participants/invite
注意: /app
路径已弃用。 今后将使用 /communications
路径。
名称
说明
Authorization
持有者 {token}。 必填。 详细了解 身份验证和授权 。
Content-type
application/json. 必需。
请求正文
在请求正文中,提供具有以下参数的 JSON 对象。
响应
如果成功,此方法返回响应 200 OK
代码和 Location 标头,其中包含为此请求创建的 inviteParticipantsOperation 的 URI。 响应正文包含创建的 inviteParticipantsOperation 。
注意: 当此 API 返回成功的响应时,所有参与者将收到名单更新。
示例
以下示例演示如何调用此 API。
注意: 为了提高可读性,可能会缩短响应对象。 所有属性都将通过实际调用返回。
示例 1:邀请一名参与者参加现有通话
请求
POST https://graph.microsoft.com/beta/communications/calls/{id}/participants/invite
Content-Type: application/json
Content-Length: 464
{
"participants": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"id": "278405a3-f568-4b3e-b684-009193463064",
"identityProvider": "AAD"
}
}
}
],
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.Beta.Models;
var requestBody = new InvitePostRequestBody
{
Participants = new List<InvitationParticipantInfo>
{
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
ReplacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "278405a3-f568-4b3e-b684-009193463064",
AdditionalData = new Dictionary<string, object>
{
{
"identityProvider" , "AAD"
},
},
},
},
},
},
ClientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].Participants.Invite.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls participants invite post --call-id {call-id} --body '{\
"participants": [\
{\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"user": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "278405a3-f568-4b3e-b684-009193463064",\
"identityProvider": "AAD"\
}\
}\
}\
],\
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-beta-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphcommunications.NewInvitePostRequestBody()
invitationParticipantInfo := graphmodels.NewInvitationParticipantInfo()
replacesCallId := "a7ebfb2d-871e-419c-87af-27290b22e8db"
invitationParticipantInfo.SetReplacesCallId(&replacesCallId)
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "278405a3-f568-4b3e-b684-009193463064"
user.SetId(&id)
additionalData := map[string]interface{}{
"identityProvider" : "AAD",
}
user.SetAdditionalData(additionalData)
identity.SetUser(user)
invitationParticipantInfo.SetIdentity(identity)
participants := []graphmodels.InvitationParticipantInfoable {
invitationParticipantInfo,
}
requestBody.SetParticipants(participants)
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext)
invite, err := graphClient.Communications().Calls().ByCallId("call-id").Participants().Invite().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody();
LinkedList<InvitationParticipantInfo> participants = new LinkedList<InvitationParticipantInfo>();
InvitationParticipantInfo invitationParticipantInfo = new InvitationParticipantInfo();
invitationParticipantInfo.setOdataType("#microsoft.graph.invitationParticipantInfo");
invitationParticipantInfo.setReplacesCallId("a7ebfb2d-871e-419c-87af-27290b22e8db");
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
Identity user = new Identity();
user.setOdataType("#microsoft.graph.identity");
user.setId("278405a3-f568-4b3e-b684-009193463064");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("identityProvider", "AAD");
user.setAdditionalData(additionalData);
identity.setUser(user);
invitationParticipantInfo.setIdentity(identity);
participants.add(invitationParticipantInfo);
invitePostRequestBody.setParticipants(participants);
invitePostRequestBody.setClientContext("f2fa86af-3c51-4bc2-8fc0-475452d9764f");
var result = graphClient.communications().calls().byCallId("{call-id}").participants().invite().post(invitePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const inviteParticipantsOperation = {
participants: [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
replacesCallId: 'a7ebfb2d-871e-419c-87af-27290b22e8db',
identity: {
'@odata.type': '#microsoft.graph.identitySet',
user: {
'@odata.type': '#microsoft.graph.identity',
id: '278405a3-f568-4b3e-b684-009193463064',
identityProvider: 'AAD'
}
}
}
],
clientContext: 'f2fa86af-3c51-4bc2-8fc0-475452d9764f'
};
await client.api('/communications/calls/{id}/participants/invite')
.version('beta')
.post(inviteParticipantsOperation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\InvitePostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InvitePostRequestBody();
$participantsInvitationParticipantInfo1 = new InvitationParticipantInfo();
$participantsInvitationParticipantInfo1->setOdataType('#microsoft.graph.invitationParticipantInfo');
$participantsInvitationParticipantInfo1->setReplacesCallId('a7ebfb2d-871e-419c-87af-27290b22e8db');
$participantsInvitationParticipantInfo1Identity = new IdentitySet();
$participantsInvitationParticipantInfo1Identity->setOdataType('#microsoft.graph.identitySet');
$participantsInvitationParticipantInfo1IdentityUser = new Identity();
$participantsInvitationParticipantInfo1IdentityUser->setOdataType('#microsoft.graph.identity');
$participantsInvitationParticipantInfo1IdentityUser->setId('278405a3-f568-4b3e-b684-009193463064');
$additionalData = [
'identityProvider' => 'AAD',
];
$participantsInvitationParticipantInfo1IdentityUser->setAdditionalData($additionalData);
$participantsInvitationParticipantInfo1Identity->setUser($participantsInvitationParticipantInfo1IdentityUser);
$participantsInvitationParticipantInfo1->setIdentity($participantsInvitationParticipantInfo1Identity);
$participantsArray []= $participantsInvitationParticipantInfo1;
$requestBody->setParticipants($participantsArray);
$requestBody->setClientContext('f2fa86af-3c51-4bc2-8fc0-475452d9764f');
$result = $graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->invite()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
participants = @(
@{
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
identity = @{
"@odata.type" = "#microsoft.graph.identitySet"
user = @{
"@odata.type" = "#microsoft.graph.identity"
id = "278405a3-f568-4b3e-b684-009193463064"
identityProvider = "AAD"
}
}
}
)
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
graph_client = GraphServiceClient(credentials, scopes)
request_body = InvitePostRequestBody(
participants = [
InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
replaces_call_id = "a7ebfb2d-871e-419c-87af-27290b22e8db",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "278405a3-f568-4b3e-b684-009193463064",
additional_data = {
"identity_provider" : "AAD",
}
),
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
响应
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.inviteParticipantsOperation",
"id": "eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"status": "Running",
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"resultInfo": null,
"participants": [
{
"endpointType": null,
"id": null,
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"identity": {
"user": {
"id": "278405a3-f568-4b3e-b684-009193463064",
"identityProvider": "AAD",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
"application": null,
"device": null,
"phone": null
}
}
]
}
通知 - 操作已完成
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"deleted",
"resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"resourceData":{
"@odata.type":"#microsoft.graph.inviteParticipantsOperation",
"participants":[
{
"@odata.type":"#microsoft.graph.invitationParticipantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"user":{
"@odata.type":"#microsoft.graph.identity",
"id":"278405a3-f568-4b3e-b684-009193463064",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
}
],
"status":"completed",
"clientContext":"f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"id":"eec3812a-fdc3-4fb4-825c-a06c9f35414e"
}
}
]
}
通知 - 已添加参与者的名单更新
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"updated",
"resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
"resourceData":[
{
"@odata.type":"#microsoft.graph.participant",
"info":{
"@odata.type":"#microsoft.graph.participantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"application":{
"@odata.type":"#microsoft.graph.identity",
"id":"278405a3-f568-4b3e-b684-009193463064",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
},
"endpointType":"default"
},
"mediaStreams":[
{
"@odata.type":"#microsoft.graph.mediaStream",
"mediaType":"audio",
"sourceId":"1",
"direction":"sendReceive",
"serverMuted":false
}
],
"isMuted":false,
"isInLobby":false,
"id":null
}
]
}
]
}
示例 2:邀请多个参与者加入现有组通话
注意 :现有组呼叫必须具有有效的 chatInfo 。 最多支持邀请 5 名参与者。
请求
POST https://graph.microsoft.com/beta/communications/calls/7531d31f-d10d-44de-802f-c569dbca451c/participants/invite
Content-Type: application/json
{
"participants": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"id": "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"identityProvider": "AAD"
}
}
},
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"id": "1e126418-44a0-4a94-a6f8-0efe1ad71acb",
"identityProvider": "AAD"
}
}
}
],
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.Beta.Models;
var requestBody = new InvitePostRequestBody
{
Participants = new List<InvitationParticipantInfo>
{
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
ReplacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
AdditionalData = new Dictionary<string, object>
{
{
"identityProvider" , "AAD"
},
},
},
},
},
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
ReplacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "1e126418-44a0-4a94-a6f8-0efe1ad71acb",
AdditionalData = new Dictionary<string, object>
{
{
"identityProvider" , "AAD"
},
},
},
},
},
},
ClientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].Participants.Invite.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls participants invite post --call-id {call-id} --body '{\
"participants": [\
{\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"user": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",\
"identityProvider": "AAD"\
}\
}\
},\
{\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"user": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "1e126418-44a0-4a94-a6f8-0efe1ad71acb",\
"identityProvider": "AAD"\
}\
}\
}\
],\
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-beta-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphcommunications.NewInvitePostRequestBody()
invitationParticipantInfo := graphmodels.NewInvitationParticipantInfo()
replacesCallId := "a7ebfb2d-871e-419c-87af-27290b22e8db"
invitationParticipantInfo.SetReplacesCallId(&replacesCallId)
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "7e1b4346-85a6-4bdd-abe3-d11c5d420efe"
user.SetId(&id)
additionalData := map[string]interface{}{
"identityProvider" : "AAD",
}
user.SetAdditionalData(additionalData)
identity.SetUser(user)
invitationParticipantInfo.SetIdentity(identity)
invitationParticipantInfo1 := graphmodels.NewInvitationParticipantInfo()
replacesCallId := "a7ebfb2d-871e-419c-87af-27290b22e8db"
invitationParticipantInfo1.SetReplacesCallId(&replacesCallId)
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "1e126418-44a0-4a94-a6f8-0efe1ad71acb"
user.SetId(&id)
additionalData := map[string]interface{}{
"identityProvider" : "AAD",
}
user.SetAdditionalData(additionalData)
identity.SetUser(user)
invitationParticipantInfo1.SetIdentity(identity)
participants := []graphmodels.InvitationParticipantInfoable {
invitationParticipantInfo,
invitationParticipantInfo1,
}
requestBody.SetParticipants(participants)
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext)
invite, err := graphClient.Communications().Calls().ByCallId("call-id").Participants().Invite().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody();
LinkedList<InvitationParticipantInfo> participants = new LinkedList<InvitationParticipantInfo>();
InvitationParticipantInfo invitationParticipantInfo = new InvitationParticipantInfo();
invitationParticipantInfo.setOdataType("#microsoft.graph.invitationParticipantInfo");
invitationParticipantInfo.setReplacesCallId("a7ebfb2d-871e-419c-87af-27290b22e8db");
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
Identity user = new Identity();
user.setOdataType("#microsoft.graph.identity");
user.setId("7e1b4346-85a6-4bdd-abe3-d11c5d420efe");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("identityProvider", "AAD");
user.setAdditionalData(additionalData);
identity.setUser(user);
invitationParticipantInfo.setIdentity(identity);
participants.add(invitationParticipantInfo);
InvitationParticipantInfo invitationParticipantInfo1 = new InvitationParticipantInfo();
invitationParticipantInfo1.setOdataType("#microsoft.graph.invitationParticipantInfo");
invitationParticipantInfo1.setReplacesCallId("a7ebfb2d-871e-419c-87af-27290b22e8db");
IdentitySet identity1 = new IdentitySet();
identity1.setOdataType("#microsoft.graph.identitySet");
Identity user1 = new Identity();
user1.setOdataType("#microsoft.graph.identity");
user1.setId("1e126418-44a0-4a94-a6f8-0efe1ad71acb");
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("identityProvider", "AAD");
user1.setAdditionalData(additionalData1);
identity1.setUser(user1);
invitationParticipantInfo1.setIdentity(identity1);
participants.add(invitationParticipantInfo1);
invitePostRequestBody.setParticipants(participants);
invitePostRequestBody.setClientContext("f2fa86af-3c51-4bc2-8fc0-475452d9764f");
var result = graphClient.communications().calls().byCallId("{call-id}").participants().invite().post(invitePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const inviteParticipantsOperation = {
participants: [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
replacesCallId: 'a7ebfb2d-871e-419c-87af-27290b22e8db',
identity: {
'@odata.type': '#microsoft.graph.identitySet',
user: {
'@odata.type': '#microsoft.graph.identity',
id: '7e1b4346-85a6-4bdd-abe3-d11c5d420efe',
identityProvider: 'AAD'
}
}
},
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
replacesCallId: 'a7ebfb2d-871e-419c-87af-27290b22e8db',
identity: {
'@odata.type': '#microsoft.graph.identitySet',
user: {
'@odata.type': '#microsoft.graph.identity',
id: '1e126418-44a0-4a94-a6f8-0efe1ad71acb',
identityProvider: 'AAD'
}
}
}
],
clientContext: 'f2fa86af-3c51-4bc2-8fc0-475452d9764f'
};
await client.api('/communications/calls/7531d31f-d10d-44de-802f-c569dbca451c/participants/invite')
.version('beta')
.post(inviteParticipantsOperation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\InvitePostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InvitePostRequestBody();
$participantsInvitationParticipantInfo1 = new InvitationParticipantInfo();
$participantsInvitationParticipantInfo1->setOdataType('#microsoft.graph.invitationParticipantInfo');
$participantsInvitationParticipantInfo1->setReplacesCallId('a7ebfb2d-871e-419c-87af-27290b22e8db');
$participantsInvitationParticipantInfo1Identity = new IdentitySet();
$participantsInvitationParticipantInfo1Identity->setOdataType('#microsoft.graph.identitySet');
$participantsInvitationParticipantInfo1IdentityUser = new Identity();
$participantsInvitationParticipantInfo1IdentityUser->setOdataType('#microsoft.graph.identity');
$participantsInvitationParticipantInfo1IdentityUser->setId('7e1b4346-85a6-4bdd-abe3-d11c5d420efe');
$additionalData = [
'identityProvider' => 'AAD',
];
$participantsInvitationParticipantInfo1IdentityUser->setAdditionalData($additionalData);
$participantsInvitationParticipantInfo1Identity->setUser($participantsInvitationParticipantInfo1IdentityUser);
$participantsInvitationParticipantInfo1->setIdentity($participantsInvitationParticipantInfo1Identity);
$participantsArray []= $participantsInvitationParticipantInfo1;
$participantsInvitationParticipantInfo2 = new InvitationParticipantInfo();
$participantsInvitationParticipantInfo2->setOdataType('#microsoft.graph.invitationParticipantInfo');
$participantsInvitationParticipantInfo2->setReplacesCallId('a7ebfb2d-871e-419c-87af-27290b22e8db');
$participantsInvitationParticipantInfo2Identity = new IdentitySet();
$participantsInvitationParticipantInfo2Identity->setOdataType('#microsoft.graph.identitySet');
$participantsInvitationParticipantInfo2IdentityUser = new Identity();
$participantsInvitationParticipantInfo2IdentityUser->setOdataType('#microsoft.graph.identity');
$participantsInvitationParticipantInfo2IdentityUser->setId('1e126418-44a0-4a94-a6f8-0efe1ad71acb');
$additionalData = [
'identityProvider' => 'AAD',
];
$participantsInvitationParticipantInfo2IdentityUser->setAdditionalData($additionalData);
$participantsInvitationParticipantInfo2Identity->setUser($participantsInvitationParticipantInfo2IdentityUser);
$participantsInvitationParticipantInfo2->setIdentity($participantsInvitationParticipantInfo2Identity);
$participantsArray []= $participantsInvitationParticipantInfo2;
$requestBody->setParticipants($participantsArray);
$requestBody->setClientContext('f2fa86af-3c51-4bc2-8fc0-475452d9764f');
$result = $graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->invite()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
participants = @(
@{
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
identity = @{
"@odata.type" = "#microsoft.graph.identitySet"
user = @{
"@odata.type" = "#microsoft.graph.identity"
id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe"
identityProvider = "AAD"
}
}
}
@{
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
identity = @{
"@odata.type" = "#microsoft.graph.identitySet"
user = @{
"@odata.type" = "#microsoft.graph.identity"
id = "1e126418-44a0-4a94-a6f8-0efe1ad71acb"
identityProvider = "AAD"
}
}
}
)
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
graph_client = GraphServiceClient(credentials, scopes)
request_body = InvitePostRequestBody(
participants = [
InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
replaces_call_id = "a7ebfb2d-871e-419c-87af-27290b22e8db",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
additional_data = {
"identity_provider" : "AAD",
}
),
),
),
InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
replaces_call_id = "a7ebfb2d-871e-419c-87af-27290b22e8db",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "1e126418-44a0-4a94-a6f8-0efe1ad71acb",
additional_data = {
"identity_provider" : "AAD",
}
),
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
响应
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.inviteParticipantsOperation",
"id":"eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"status":"Running",
"clientContext":"f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"resultInfo":null,
"participants":[
{
"endpointType":null,
"id":null,
"replacesCallId":null,
"identity":{
"user":{
"id":"7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
},
"application":null,
"device":null,
"phone":null
}
},
{
"endpointType":null,
"id":null,
"replacesCallId":null,
"identity":{
"user":{
"id":"1e126418-44a0-4a94-a6f8-0efe1ad71acb",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
},
"application":null,
"device":null,
"phone":null
}
}
]
}
通知 - 操作已完成
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.commsNotifications",
"value": [
{
"@odata.type": "#microsoft.graph.commsNotification",
"changeType": "deleted",
"resource": "/communications/calls/7531d31f-d10d-44de-802f-c569dbca451c/operations/participants",
"resourceUrl": "/communications/calls/7531d31f-d10d-44de-802f-c569dbca451c/operations/participants",
"resourceData": {
"@odata.type": "#microsoft.graph.inviteParticipantsOperation",
"participants": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user":{
"id":"7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
},
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user":{
"id":"1e126418-44a0-4a94-a6f8-0efe1ad71acb",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
}
],
"status": "completed",
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"id": null
}
}
]
}
通知 - 已添加参与者更新名单
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.commsNotifications",
"value": [
{
"@odata.type": "#microsoft.graph.commsNotification",
"changeType": "updated",
"resource": "/app/calls/7531d31f-d10d-44de-802f-c569dbca451c/operations/participants",
"resourceUrl": "/communications/calls/7531d31f-d10d-44de-802f-c569dbca451c/operations/participants",
"resourceData": [
{
"@odata.type": "#microsoft.graph.participant",
"info": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"application": {
"@odata.type": "#microsoft.graph.identity",
"id": "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
}
},
"endpointType": "default"
},
"mediaStreams": [
{
"@odata.type": "#microsoft.graph.mediaStream",
"mediaType": "audio",
"sourceId": "1",
"direction": "sendReceive",
"serverMuted": false
}
],
"isMuted": false,
"isInLobby": false,
"id": null
},
{
"@odata.type": "#microsoft.graph.participant",
"info": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user":{
"id":"1e126418-44a0-4a94-a6f8-0efe1ad71acb",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
},
"endpointType": "default"
},
"mediaStreams": [
{
"@odata.type": "#microsoft.graph.mediaStream",
"mediaType": "audio",
"sourceId": "3",
"direction": "sendReceive",
"serverMuted": false
}
],
"isMuted": false,
"isInLobby": false,
"id": null
}
]
}
]
}
示例 3:邀请参与者加入现有组通话,替换现有的对等呼叫
替换现有的对等调用时,邀请 API 仅支持一个参与者。
当请求正文中提供了多个参与者时,只会读取第一个参与者,其余参与者将被忽略。
注意: 邀请 API 在提供 时 replacesCallId
仅支持一个参与者。
有关使用 replacesCallId
替换现有对等呼叫的详细信息,请参阅 invitationParticipantInfo 。
请求
POST https://graph.microsoft.com/beta/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants/invite
Content-Type: application/json
{
"participants": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"id": "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"identityProvider": "AAD"
}
}
}
],
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.Beta.Models;
var requestBody = new InvitePostRequestBody
{
Participants = new List<InvitationParticipantInfo>
{
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
ReplacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
AdditionalData = new Dictionary<string, object>
{
{
"identityProvider" , "AAD"
},
},
},
},
},
},
ClientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].Participants.Invite.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls participants invite post --call-id {call-id} --body '{\
"participants": [\
{\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"user": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",\
"identityProvider": "AAD"\
}\
}\
}\
],\
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-beta-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphcommunications.NewInvitePostRequestBody()
invitationParticipantInfo := graphmodels.NewInvitationParticipantInfo()
replacesCallId := "a7ebfb2d-871e-419c-87af-27290b22e8db"
invitationParticipantInfo.SetReplacesCallId(&replacesCallId)
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "7e1b4346-85a6-4bdd-abe3-d11c5d420efe"
user.SetId(&id)
additionalData := map[string]interface{}{
"identityProvider" : "AAD",
}
user.SetAdditionalData(additionalData)
identity.SetUser(user)
invitationParticipantInfo.SetIdentity(identity)
participants := []graphmodels.InvitationParticipantInfoable {
invitationParticipantInfo,
}
requestBody.SetParticipants(participants)
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext)
invite, err := graphClient.Communications().Calls().ByCallId("call-id").Participants().Invite().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody();
LinkedList<InvitationParticipantInfo> participants = new LinkedList<InvitationParticipantInfo>();
InvitationParticipantInfo invitationParticipantInfo = new InvitationParticipantInfo();
invitationParticipantInfo.setOdataType("#microsoft.graph.invitationParticipantInfo");
invitationParticipantInfo.setReplacesCallId("a7ebfb2d-871e-419c-87af-27290b22e8db");
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
Identity user = new Identity();
user.setOdataType("#microsoft.graph.identity");
user.setId("7e1b4346-85a6-4bdd-abe3-d11c5d420efe");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("identityProvider", "AAD");
user.setAdditionalData(additionalData);
identity.setUser(user);
invitationParticipantInfo.setIdentity(identity);
participants.add(invitationParticipantInfo);
invitePostRequestBody.setParticipants(participants);
invitePostRequestBody.setClientContext("f2fa86af-3c51-4bc2-8fc0-475452d9764f");
var result = graphClient.communications().calls().byCallId("{call-id}").participants().invite().post(invitePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const inviteParticipantsOperation = {
participants: [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
replacesCallId: 'a7ebfb2d-871e-419c-87af-27290b22e8db',
identity: {
'@odata.type': '#microsoft.graph.identitySet',
user: {
'@odata.type': '#microsoft.graph.identity',
id: '7e1b4346-85a6-4bdd-abe3-d11c5d420efe',
identityProvider: 'AAD'
}
}
}
],
clientContext: 'f2fa86af-3c51-4bc2-8fc0-475452d9764f'
};
await client.api('/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants/invite')
.version('beta')
.post(inviteParticipantsOperation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\InvitePostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InvitePostRequestBody();
$participantsInvitationParticipantInfo1 = new InvitationParticipantInfo();
$participantsInvitationParticipantInfo1->setOdataType('#microsoft.graph.invitationParticipantInfo');
$participantsInvitationParticipantInfo1->setReplacesCallId('a7ebfb2d-871e-419c-87af-27290b22e8db');
$participantsInvitationParticipantInfo1Identity = new IdentitySet();
$participantsInvitationParticipantInfo1Identity->setOdataType('#microsoft.graph.identitySet');
$participantsInvitationParticipantInfo1IdentityUser = new Identity();
$participantsInvitationParticipantInfo1IdentityUser->setOdataType('#microsoft.graph.identity');
$participantsInvitationParticipantInfo1IdentityUser->setId('7e1b4346-85a6-4bdd-abe3-d11c5d420efe');
$additionalData = [
'identityProvider' => 'AAD',
];
$participantsInvitationParticipantInfo1IdentityUser->setAdditionalData($additionalData);
$participantsInvitationParticipantInfo1Identity->setUser($participantsInvitationParticipantInfo1IdentityUser);
$participantsInvitationParticipantInfo1->setIdentity($participantsInvitationParticipantInfo1Identity);
$participantsArray []= $participantsInvitationParticipantInfo1;
$requestBody->setParticipants($participantsArray);
$requestBody->setClientContext('f2fa86af-3c51-4bc2-8fc0-475452d9764f');
$result = $graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->invite()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
participants = @(
@{
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
identity = @{
"@odata.type" = "#microsoft.graph.identitySet"
user = @{
"@odata.type" = "#microsoft.graph.identity"
id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe"
identityProvider = "AAD"
}
}
}
)
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
graph_client = GraphServiceClient(credentials, scopes)
request_body = InvitePostRequestBody(
participants = [
InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
replaces_call_id = "a7ebfb2d-871e-419c-87af-27290b22e8db",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
additional_data = {
"identity_provider" : "AAD",
}
),
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
响应
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.inviteParticipantsOperation",
"id": "278405a3-f568-4b3e-b684-009193463064",
"status": "Running",
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"resultInfo": null,
"participants": [
{
"endpointType": null,
"id": null,
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"identity": {
"user": {
"id": "7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"displayName": "Participant",
"identityProvider": "AAD",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
"application": null,
"device": null,
"phone": null
}
}
]
}
通知 - 操作已完成
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"deleted",
"resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/278405a3-f568-4b3e-b684-009193463064",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/278405a3-f568-4b3e-b684-009193463064",
"resourceData":{
"@odata.type":"#microsoft.graph.inviteParticipantsOperation",
"participants":[
{
"@odata.type":"#microsoft.graph.invitationParticipantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"user":{
"@odata.type":"#microsoft.graph.identity",
"id":"7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
}
],
"status":"completed",
"clientContext":"f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"id":"278405a3-f568-4b3e-b684-009193463064"
}
}
]
}
通知 - 已添加参与者的名单更新
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"updated",
"resource":"/communications/calls/a7ebfb2d-871e-419c-87af-27290b22e8db/participants",
"resourceUrl":"/communications/calls/a7ebfb2d-871e-419c-87af-27290b22e8db/participants",
"resourceData":[
{
"@odata.type":"#microsoft.graph.participant",
"info":{
"@odata.type":"#microsoft.graph.participantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"user":{
"@odata.type":"#microsoft.graph.identity",
"id":"7e1b4346-85a6-4bdd-abe3-d11c5d420efe",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
},
"endpointType":"default"
},
"mediaStreams":[
{
"@odata.type":"#microsoft.graph.mediaStream",
"mediaType":"audio",
"sourceId":"1",
"direction":"sendReceive",
"serverMuted":false
}
],
"isMuted":false,
"isInLobby":false,
"id":null
}
]
}
]
}
注意: 如果状态为“已完成”,则预期会收到有关原始对等呼叫已终止和删除的通知。
示例 4:邀请一个 PSTN 参与者加入现有呼叫
此调用需要分配了 PSTN 号码的应用程序实例。 有关详细信息,请参阅 为机器人分配电话号码 。
注意: 电话 ID 是 E.164 格式的电话号码。
请求
POST https://graph.microsoft.com/beta/communications/calls/{id}/participants/invite
Content-Type: application/json
Content-Length: 464
{
"participants": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"phone": {
"@odata.type": "#microsoft.graph.identity",
"id": "+12345678901"
}
}
}
],
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.Beta.Models;
var requestBody = new InvitePostRequestBody
{
Participants = new List<InvitationParticipantInfo>
{
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
AdditionalData = new Dictionary<string, object>
{
{
"phone" , new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "+12345678901",
}
},
},
},
},
},
ClientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].Participants.Invite.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls participants invite post --call-id {call-id} --body '{\
"participants": [\
{\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"phone": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "+12345678901"\
}\
}\
}\
],\
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-beta-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphcommunications.NewInvitePostRequestBody()
invitationParticipantInfo := graphmodels.NewInvitationParticipantInfo()
identity := graphmodels.NewIdentitySet()
additionalData := map[string]interface{}{
phone := graphmodels.NewIdentity()
id := "+12345678901"
phone.SetId(&id)
identity.SetPhone(phone)
}
identity.SetAdditionalData(additionalData)
invitationParticipantInfo.SetIdentity(identity)
participants := []graphmodels.InvitationParticipantInfoable {
invitationParticipantInfo,
}
requestBody.SetParticipants(participants)
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext)
invite, err := graphClient.Communications().Calls().ByCallId("call-id").Participants().Invite().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody();
LinkedList<InvitationParticipantInfo> participants = new LinkedList<InvitationParticipantInfo>();
InvitationParticipantInfo invitationParticipantInfo = new InvitationParticipantInfo();
invitationParticipantInfo.setOdataType("#microsoft.graph.invitationParticipantInfo");
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
Identity phone = new Identity();
phone.setOdataType("#microsoft.graph.identity");
phone.setId("+12345678901");
additionalData.put("phone", phone);
identity.setAdditionalData(additionalData);
invitationParticipantInfo.setIdentity(identity);
participants.add(invitationParticipantInfo);
invitePostRequestBody.setParticipants(participants);
invitePostRequestBody.setClientContext("f2fa86af-3c51-4bc2-8fc0-475452d9764f");
var result = graphClient.communications().calls().byCallId("{call-id}").participants().invite().post(invitePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const inviteParticipantsOperation = {
participants: [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
identity: {
'@odata.type': '#microsoft.graph.identitySet',
phone: {
'@odata.type': '#microsoft.graph.identity',
id: '+12345678901'
}
}
}
],
clientContext: 'f2fa86af-3c51-4bc2-8fc0-475452d9764f'
};
await client.api('/communications/calls/{id}/participants/invite')
.version('beta')
.post(inviteParticipantsOperation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\InvitePostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InvitePostRequestBody();
$participantsInvitationParticipantInfo1 = new InvitationParticipantInfo();
$participantsInvitationParticipantInfo1->setOdataType('#microsoft.graph.invitationParticipantInfo');
$participantsInvitationParticipantInfo1Identity = new IdentitySet();
$participantsInvitationParticipantInfo1Identity->setOdataType('#microsoft.graph.identitySet');
$additionalData = [
'phone' => [
'@odata.type' => '#microsoft.graph.identity',
'id' => '+12345678901',
],
];
$participantsInvitationParticipantInfo1Identity->setAdditionalData($additionalData);
$participantsInvitationParticipantInfo1->setIdentity($participantsInvitationParticipantInfo1Identity);
$participantsArray []= $participantsInvitationParticipantInfo1;
$requestBody->setParticipants($participantsArray);
$requestBody->setClientContext('f2fa86af-3c51-4bc2-8fc0-475452d9764f');
$result = $graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->invite()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
participants = @(
@{
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
identity = @{
"@odata.type" = "#microsoft.graph.identitySet"
phone = @{
"@odata.type" = "#microsoft.graph.identity"
id = "+12345678901"
}
}
}
)
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
graph_client = GraphServiceClient(credentials, scopes)
request_body = InvitePostRequestBody(
participants = [
InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
additional_data = {
"phone" : {
"@odata_type" : "#microsoft.graph.identity",
"id" : "+12345678901",
},
}
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
响应
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.inviteParticipantsOperation",
"id": "eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"status": "Running",
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"resultInfo": null,
"participants": [
{
"endpointType": null,
"id": null,
"replacesCallId": null,
"identity": {
"user": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"applicationInstance": null,
"application": null,
"device": null,
"phone": {
"@odata.type": "#microsoft.graph.identity",
"id": "+12345678901"
}
}
}
]
}
通知 - 操作已完成
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"deleted",
"resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/eec3812a-fdc3-4fb4-825c-a06c9f35414e",
"resourceData":{
"@odata.type":"#microsoft.graph.inviteParticipantsOperation",
"participants":[
{
"@odata.type":"#microsoft.graph.invitationParticipantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"phone": {
"@odata.type": "#microsoft.graph.identity",
"id": "+12345678901"
}
}
}
],
"status":"completed",
"clientContext":"f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"id":"eec3812a-fdc3-4fb4-825c-a06c9f35414e"
}
}
]
}
通知 - 已添加参与者的名单更新
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"updated",
"resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
"resourceData":[
{
"@odata.type":"#microsoft.graph.participant",
"info":{
"@odata.type":"#microsoft.graph.participantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"phone": {
"@odata.type": "#microsoft.graph.identity",
"id": "+12345678901"
}
},
"endpointType":"default"
},
"mediaStreams":[
{
"@odata.type":"#microsoft.graph.mediaStream",
"mediaType":"audio",
"sourceId":"1",
"direction":"sendReceive",
"serverMuted":false
}
],
"isMuted":false,
"isInLobby":false,
"id":null
}
]
}
]
}
注意: completed
使用状态时,可以预期收到有关原始对等呼叫已终止和删除的通知。
示例 5:将一个参与者从一个会议移到另一个会议
如果同一应用程序创建了这两个会议,则可以将一个参与者从一个会议移到另一个会议。
有关如何创建联机会议的详细信息,请参阅 创建 onlineMeeting 。
注意: 邀请 API 每个请求只能移动一个参与者。 如果在请求正文中提供了多个参与者,邀请 API 将仅移动第一个参与者。
请求
以下示例显示了一个请求。
POST https://graph.microsoft.com/beta/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants/invite
Content-Type: application/json
{
"participants": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"participantId": "7d501bf1-5ee4-4605-ba92-0ae4513c611c",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"id": "682b6c37-0729-4fab-ace6-d730d5d9137e",
"identityProvider": "AAD"
}
}
}
],
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.Beta.Models;
var requestBody = new InvitePostRequestBody
{
Participants = new List<InvitationParticipantInfo>
{
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
ReplacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
ParticipantId = "7d501bf1-5ee4-4605-ba92-0ae4513c611c",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "682b6c37-0729-4fab-ace6-d730d5d9137e",
AdditionalData = new Dictionary<string, object>
{
{
"identityProvider" , "AAD"
},
},
},
},
},
},
ClientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].Participants.Invite.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls participants invite post --call-id {call-id} --body '{\
"participants": [\
{\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",\
"participantId": "7d501bf1-5ee4-4605-ba92-0ae4513c611c",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"user": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "682b6c37-0729-4fab-ace6-d730d5d9137e",\
"identityProvider": "AAD"\
}\
}\
}\
],\
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-beta-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphcommunications.NewInvitePostRequestBody()
invitationParticipantInfo := graphmodels.NewInvitationParticipantInfo()
replacesCallId := "a7ebfb2d-871e-419c-87af-27290b22e8db"
invitationParticipantInfo.SetReplacesCallId(&replacesCallId)
participantId := "7d501bf1-5ee4-4605-ba92-0ae4513c611c"
invitationParticipantInfo.SetParticipantId(&participantId)
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "682b6c37-0729-4fab-ace6-d730d5d9137e"
user.SetId(&id)
additionalData := map[string]interface{}{
"identityProvider" : "AAD",
}
user.SetAdditionalData(additionalData)
identity.SetUser(user)
invitationParticipantInfo.SetIdentity(identity)
participants := []graphmodels.InvitationParticipantInfoable {
invitationParticipantInfo,
}
requestBody.SetParticipants(participants)
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext)
invite, err := graphClient.Communications().Calls().ByCallId("call-id").Participants().Invite().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.beta.communications.calls.item.participants.invite.InvitePostRequestBody();
LinkedList<InvitationParticipantInfo> participants = new LinkedList<InvitationParticipantInfo>();
InvitationParticipantInfo invitationParticipantInfo = new InvitationParticipantInfo();
invitationParticipantInfo.setOdataType("#microsoft.graph.invitationParticipantInfo");
invitationParticipantInfo.setReplacesCallId("a7ebfb2d-871e-419c-87af-27290b22e8db");
invitationParticipantInfo.setParticipantId("7d501bf1-5ee4-4605-ba92-0ae4513c611c");
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
Identity user = new Identity();
user.setOdataType("#microsoft.graph.identity");
user.setId("682b6c37-0729-4fab-ace6-d730d5d9137e");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("identityProvider", "AAD");
user.setAdditionalData(additionalData);
identity.setUser(user);
invitationParticipantInfo.setIdentity(identity);
participants.add(invitationParticipantInfo);
invitePostRequestBody.setParticipants(participants);
invitePostRequestBody.setClientContext("f2fa86af-3c51-4bc2-8fc0-475452d9764f");
var result = graphClient.communications().calls().byCallId("{call-id}").participants().invite().post(invitePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const inviteParticipantsOperation = {
participants: [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
replacesCallId: 'a7ebfb2d-871e-419c-87af-27290b22e8db',
participantId: '7d501bf1-5ee4-4605-ba92-0ae4513c611c',
identity: {
'@odata.type': '#microsoft.graph.identitySet',
user: {
'@odata.type': '#microsoft.graph.identity',
id: '682b6c37-0729-4fab-ace6-d730d5d9137e',
identityProvider: 'AAD'
}
}
}
],
clientContext: 'f2fa86af-3c51-4bc2-8fc0-475452d9764f'
};
await client.api('/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants/invite')
.version('beta')
.post(inviteParticipantsOperation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\InvitePostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InvitePostRequestBody();
$participantsInvitationParticipantInfo1 = new InvitationParticipantInfo();
$participantsInvitationParticipantInfo1->setOdataType('#microsoft.graph.invitationParticipantInfo');
$participantsInvitationParticipantInfo1->setReplacesCallId('a7ebfb2d-871e-419c-87af-27290b22e8db');
$participantsInvitationParticipantInfo1->setParticipantId('7d501bf1-5ee4-4605-ba92-0ae4513c611c');
$participantsInvitationParticipantInfo1Identity = new IdentitySet();
$participantsInvitationParticipantInfo1Identity->setOdataType('#microsoft.graph.identitySet');
$participantsInvitationParticipantInfo1IdentityUser = new Identity();
$participantsInvitationParticipantInfo1IdentityUser->setOdataType('#microsoft.graph.identity');
$participantsInvitationParticipantInfo1IdentityUser->setId('682b6c37-0729-4fab-ace6-d730d5d9137e');
$additionalData = [
'identityProvider' => 'AAD',
];
$participantsInvitationParticipantInfo1IdentityUser->setAdditionalData($additionalData);
$participantsInvitationParticipantInfo1Identity->setUser($participantsInvitationParticipantInfo1IdentityUser);
$participantsInvitationParticipantInfo1->setIdentity($participantsInvitationParticipantInfo1Identity);
$participantsArray []= $participantsInvitationParticipantInfo1;
$requestBody->setParticipants($participantsArray);
$requestBody->setClientContext('f2fa86af-3c51-4bc2-8fc0-475452d9764f');
$result = $graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->invite()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.CloudCommunications
$params = @{
participants = @(
@{
"@odata.type" = "#microsoft.graph.invitationParticipantInfo"
replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db"
participantId = "7d501bf1-5ee4-4605-ba92-0ae4513c611c"
identity = @{
"@odata.type" = "#microsoft.graph.identitySet"
user = @{
"@odata.type" = "#microsoft.graph.identity"
id = "682b6c37-0729-4fab-ace6-d730d5d9137e"
identityProvider = "AAD"
}
}
}
)
clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
}
Invoke-MgBetaInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
graph_client = GraphServiceClient(credentials, scopes)
request_body = InvitePostRequestBody(
participants = [
InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
replaces_call_id = "a7ebfb2d-871e-419c-87af-27290b22e8db",
participant_id = "7d501bf1-5ee4-4605-ba92-0ae4513c611c",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "682b6c37-0729-4fab-ace6-d730d5d9137e",
additional_data = {
"identity_provider" : "AAD",
}
),
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
响应
以下示例显示了相应的响应。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.inviteParticipantsOperation",
"id": "278405a3-f568-4b3e-b684-009193463064",
"status": "Running",
"clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"resultInfo": null,
"participants": [
{
"endpointType": null,
"id": null,
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
"participantId": "7d501bf1-5ee4-4605-ba92-0ae4513c611c",
"identity": {
"user": {
"id": "682b6c37-0729-4fab-ace6-d730d5d9137e",
"displayName": "Participant",
"identityProvider": "AAD",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
"application": null,
"device": null,
"phone": null
}
}
]
}
通知 - 操作已完成
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"deleted",
"resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/278405a3-f568-4b3e-b684-009193463064",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/278405a3-f568-4b3e-b684-009193463064",
"resourceData":{
"@odata.type":"#microsoft.graph.inviteParticipantsOperation",
"participants":[
{
"@odata.type":"#microsoft.graph.invitationParticipantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"user":{
"@odata.type":"#microsoft.graph.identity",
"id":"682b6c37-0729-4fab-ace6-d730d5d9137e",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
}
],
"status":"completed",
"clientContext":"f2fa86af-3c51-4bc2-8fc0-475452d9764f",
"id":"278405a3-f568-4b3e-b684-009193463064"
}
}
]
}
通知 - 已添加参与者的名单更新
POST https://bot.contoso.com/api/calls
Content-Type: application/json
{
"@odata.type":"#microsoft.graph.commsNotifications",
"value":[
{
"@odata.type":"#microsoft.graph.commsNotification",
"changeType":"updated",
"resource":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
"resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
"resourceData":[
{
"@odata.type":"#microsoft.graph.participant",
"info":{
"@odata.type":"#microsoft.graph.participantInfo",
"identity":{
"@odata.type":"#microsoft.graph.identitySet",
"user":{
"@odata.type":"#microsoft.graph.identity",
"id":"682b6c37-0729-4fab-ace6-d730d5d9137e",
"identityProvider":"AAD",
"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"
}
},
"endpointType":"default"
},
"mediaStreams":[
{
"@odata.type":"#microsoft.graph.mediaStream",
"mediaType":"audio",
"sourceId":"1",
"direction":"sendReceive",
"serverMuted":false
}
],
"isMuted":false,
"isInLobby":false,
"id":null
}
]
}
]
}