Wählen Sie für diese API die Als am wenigsten privilegierten Berechtigungen gekennzeichneten Berechtigungen aus. Verwenden Sie nur dann eine Berechtigung mit höheren Berechtigungen , wenn dies für Ihre App erforderlich ist. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
Berechtigungstyp
Berechtigungen mit den geringsten Berechtigungen
Berechtigungen mit höheren Berechtigungen
Delegiert (Geschäfts-, Schul- oder Unikonto)
Nicht unterstützt
Nicht unterstützt
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Nicht unterstützt
Anwendung
Calls.InitiateGroupCall.All
Nicht verfügbar.
HTTP-Anforderung
POST /communications/calls/{id}/participants/invite
Eindeutige Clientkontextzeichenfolge. Der maximale Grenzwert beträgt 256 Zeichen.
Antwort
Bei erfolgreicher Ausführung gibt die Methode einen 200 OK Antwortcode und einen Location-Header mit einem URI für die für diese Anforderung erstellte inviteParticipantsOperation zurück.
Anmerkung: Wenn diese API eine erfolgreiche Antwort zurückgibt, erhalten alle Teilnehmer eine Aktualisierung der Liste.
Beispiele
In den folgenden Beispielen wird gezeigt, wie diese API aufgerufen wird.
Anmerkung: Die Antwortobjekte können aus Gründen der Lesbarkeit gekürzt werden. Alle Eigenschaften werden von einem tatsächlichen Aufruf zurückgegeben.
Beispiel 1: Einladen eines Teilnehmers zu einem vorhandenen Anruf
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.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",
DisplayName = "string",
},
},
},
},
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);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.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");
user.setDisplayName("string");
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);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Communications\Calls\Item\Participants\Invite\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');
$participantsInvitationParticipantInfo1IdentityUser->setDisplayName('string');
$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();
# Code snippets are only available for the latest version. Current version is 1.x
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
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
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",
display_name = "string",
),
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.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",
DisplayName = "string",
},
},
},
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",
DisplayName = "string",
},
},
},
},
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);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.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");
user.setDisplayName("string");
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");
user1.setDisplayName("string");
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);
Beispiel 3: Einladen von Teilnehmern zu einem vorhandenen Gruppenanruf, Ersetzen eines vorhandenen Peer-to-Peer-Anrufs
Die Einladungs-API unterstützt nur einen Teilnehmer, wenn ein vorhandener Peer-to-Peer-Aufruf ersetzt wird. Wenn mehrere Teilnehmer im Anforderungstext angegeben werden, wird nur der erste Teilnehmer gelesen, und der Rest der Teilnehmer wird ignoriert.
Anmerkung: Die Einladungs-API unterstützt nur einen Teilnehmer, wenn replacesCallId bereitgestellt wird.
Ausführliche Informationen zur Verwendung von replacesCallId zum Ersetzen eines vorhandenen Peer-to-Peer-Anrufs finden Sie unter invitationParticipantInfo.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.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",
DisplayName = "string",
},
},
},
},
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);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.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");
user.setDisplayName("string");
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);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Communications\Calls\Item\Participants\Invite\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');
$participantsInvitationParticipantInfo1IdentityUser->setDisplayName('string');
$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();
# Code snippets are only available for the latest version. Current version is 1.x
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
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
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",
display_name = "string",
),
),
),
],
client_context = "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
)
result = await graph_client.communications.calls.by_call_id('call-id').participants.invite.post(request_body)
Anmerkung: Mit dem Status "Abgeschlossen" können Sie davon ausgehen, dass Sie Benachrichtigungen darüber erhalten, wie Ihr ursprünglicher Peer-to-Peer-Anruf beendet und gelöscht wurde.
Beispiel 4: Einladen eines PSTN-Teilnehmers zu einem vorhandenen Anruf
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.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);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.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);
# Code snippets are only available for the latest version. Current version is 1.x
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
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
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)
Anmerkung: Mit einem completed Status können Sie Benachrichtigungen darüber erhalten, wie Ihr ursprünglicher Peer-to-Peer-Anruf beendet und gelöscht wurde.
Beispiel 5: Verschieben eines Teilnehmers von einer Besprechung in eine andere
Sie können einen Teilnehmer von einer Besprechung in eine andere verschieben, wenn diese beiden Besprechungen von derselben Anwendung erstellt wurden.
Weitere Informationen zum Erstellen einer Onlinebesprechung finden Sie unter Erstellen von onlineMeeting.
Anmerkung: Die Einladungs-API kann pro Anforderung nur einen Teilnehmer verschieben. Wenn Sie mehr als einen Teilnehmer im Anforderungstext angeben, verschiebt die Einladungs-API nur den ersten Teilnehmer.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Participants.Invite;
using Microsoft.Graph.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);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.participants.invite.InvitePostRequestBody invitePostRequestBody = new com.microsoft.graph.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);
# Code snippets are only available for the latest version. Current version is 1.x
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
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
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)