Supprimer un participant spécifique dans un appel. Dans certains cas, il est approprié pour une application de supprimer un participant d’un appel actif. Cette action peut être effectuée avant ou après que le participant répond à l’appel. Lorsqu’un appelant actif est supprimé, il est immédiatement supprimé de l’appel sans notification préalable ou postérieure à la suppression. Lorsqu’un participant invité est supprimé, toute demande d’ajout de participant en attente est annulée.
La configuration d’une réunion d’application au niveau du locataire est requise pour permettre à une application d’appeler cette API. L’administrateur du locataire doit appeler l’applet de commande suivante sur le client distant PowerShell pour accorder l’autorisation à l’application d’appeler cette API. Pour plus d’informations, consultez Set-CsApplicationMeetingConfiguration.
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Participants["{participant-id}"].DeleteAsync();
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Communications().Calls().ByCallId("call-id").Participants().ByParticipantId("participant-id").Delete(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.communications().calls().byCallId("{call-id}").participants().byParticipantId("{participant-id}").delete();
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->byParticipantId('participant-id')->delete()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.communications.calls.by_call_id('call-id').participants.by_participant_id('participant-id').delete()
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
HTTP/1.1 204 No Content
Exemple 2 : Annuler un participant invité non actif
Inviter un participant à un appel existant
Note: Fournissez une valeur pour le participantId membre de l’objet invitationParticipantInfo afin de pouvoir l’utiliser pour annuler l’invitation ultérieurement.
// 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",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "278405a3-f568-4b3e-b684-009193463064",
AdditionalData = new Dictionary<string, object>
{
{
"identityProvider" , "AAD"
},
},
},
},
ParticipantId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
},
},
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");
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);
invitationParticipantInfo.setParticipantId("a7ebfb2d-871e-419c-87af-27290b22e8db");
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",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "278405a3-f568-4b3e-b684-009193463064",
additional_data = {
"identity_provider" : "AAD",
}
),
),
participant_id = "a7ebfb2d-871e-419c-87af-27290b22e8db",
),
],
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
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Participants["{participant-id}"].DeleteAsync();
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Communications().Calls().ByCallId("call-id").Participants().ByParticipantId("participant-id").Delete(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.communications().calls().byCallId("{call-id}").participants().byParticipantId("{participant-id}").delete();
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->communications()->calls()->byCallId('call-id')->participants()->byParticipantId('participant-id')->delete()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.communications.calls.by_call_id('call-id').participants.by_participant_id('participant-id').delete()