Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Inviter des participants à l’appel en cours.
Pour plus d’informations sur la gestion des opérations, consultez commsOperation.
Remarque :
L’invitation de plusieurs participants dans une seule requête est prise en charge uniquement pour les appels de groupe.
L’invitation de plusieurs bots à une réunion ou un appel de groupe n’est pas autorisée.
// 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);
// 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);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph_beta.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph_beta.generated.models.identity_set import IdentitySet
from msgraph_beta.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",
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)
// 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);
// 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);
Exemple 3 : Inviter des participants à un appel de groupe existant, en remplaçant un appel d’égal à égal existant
L’API d’invitation ne prend en charge qu’un seul participant lorsque vous remplacez un appel pair à pair existant. Lorsque plusieurs participants sont fournis dans le corps de la demande, seul le premier participant est lu et les autres participants sont ignorés.
Note: L’API d’invitation ne prend en charge qu’un seul participant quand replacesCallId est fourni.
Pour plus d’informations sur l’utilisation replacesCallId de pour remplacer un appel pair à pair existant, consultez invitationParticipantInfo.
// 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);
// 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);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph_beta.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph_beta.generated.models.identity_set import IdentitySet
from msgraph_beta.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",
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)
Note: Avec l’état « terminé », vous pouvez vous attendre à recevoir des notifications sur la façon dont votre appel d’égal à égal d’origine a été arrêté et supprimé.
Exemple 4 : Inviter un participant RTC à un appel existant
// 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);
// 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);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph_beta.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph_beta.generated.models.identity_set import IdentitySet
from msgraph_beta.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)
Note: Avec un completed état, vous pouvez vous attendre à recevoir des notifications sur la façon dont votre appel pair à pair d’origine a été arrêté et supprimé.
Exemple 5 : Déplacer un participant d’une réunion à une autre
Vous pouvez déplacer un participant d’une réunion à une autre si ces deux réunions ont été créées par la même application.
Pour plus d’informations sur la création d’une réunion en ligne, consultez Créer onlineMeeting.
Note: L’API d’invitation ne peut déplacer qu’un seul participant par demande. Si vous fournissez plusieurs participants dans le corps de la demande, l’API d’invitation déplace uniquement le premier.
// 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);
// 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);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.communications.calls.item.participants.invite.invite_post_request_body import InvitePostRequestBody
from msgraph_beta.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph_beta.generated.models.identity_set import IdentitySet
from msgraph_beta.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)