Teilnehmer löschen
Artikel
07/18/2022
6 Minuten Lesedauer
3 Mitwirkende
In diesem Artikel
Löschen eines bestimmten Teilnehmers an einem Anruf. In einigen Situationen ist es angemessen, dass eine Anwendung einen Teilnehmer aus einem aktiven Anruf entfernt. Diese Aktion kann durchgeführt werden, bevor oder nachdem der Teilnehmer den Anruf angenommen hat. Wenn ein aktiver Anrufer entfernt wird, wird er sofort ohne Benachrichtigung vor oder nach dem Entfernen aus dem Anruf entfernt. Wenn ein eingeladener Teilnehmer entfernt wird, wird jede ausstehende Teilnehmeranforderung abgebrochen.
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen .
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
Nicht unterstützt
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
Calls.JoinGroupCallsasGuest.All oder Calls.JoinGroupCalls.All
Die Konfiguration von Anwendungsbesprechung auf Mandantenebene ist erforderlich, damit eine Anwendung diese API aufrufen kann. Der Mandantenadministrator sollte das folgende Cmdlet auf der Remote-PowerShell des Mandanten aufrufen, um der Anwendung die Berechtigung zum Aufrufen dieser API zu erteilen. Weitere Informationen finden Sie unter "Set-CsApplicationMeetingConfiguration ".
PS C:\> Set-CsApplicationMeetingConfiguration -AllowRemoveParticipantAppIds @{Add="app_id"}
HTTP-Anforderung
DELETE /communications/calls/{id}/participants/{id}
Name
Beschreibung
Authorization
Bearer {token}. Erforderlich.
Anforderungstext
Geben Sie für diese Methode keinen Anforderungstext an.
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content zurückgegeben. Im Antworttext wird nichts zurückgegeben.
Beispiele
Beispiel 1: Abbrechen eines aktiven Teilnehmers
Anforderung
Das folgende Beispiel zeigt die Antwort.
DELETE https://graph.microsoft.com/v1.0/communications/calls/{id}/participants/{id}
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/communications/calls/{id}/participants/{id}"]]];
[urlRequest setHTTPMethod:@"DELETE"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
callId := "call-id"
participantId := "participant-id"
graphClient.Communications().CallsById(&callId).ParticipantsById(&participantId).Delete()
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 204 No Content
Beispiel 2: Abbrechen eingeladener nicht aktiver Teilnehmer
Einladen eines Teilnehmers zu einem vorhandenen Anruf
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"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var participants = new List<InvitationParticipantInfo>()
{
new InvitationParticipantInfo
{
ReplacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db",
Identity = new IdentitySet
{
User = new Identity
{
Id = "278405a3-f568-4b3e-b684-009193463064",
AdditionalData = new Dictionary<string, object>()
{
{"identityProvider", "AAD"}
}
}
}
}
};
var clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f";
await graphClient.Communications.Calls["{call-id}"].Participants
.Invite(participants,clientContext)
.Request()
.PostAsync();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/communications/calls/{id}/participants/invite"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
NSMutableArray *participantsList = [[NSMutableArray alloc] init];
MSGraphInvitationParticipantInfo *participants = [[MSGraphInvitationParticipantInfo alloc] init];
[participants setReplacesCallId:@"a7ebfb2d-871e-419c-87af-27290b22e8db"];
MSGraphIdentitySet *identity = [[MSGraphIdentitySet alloc] init];
MSGraphIdentity *user = [[MSGraphIdentity alloc] init];
[user setId:@"278405a3-f568-4b3e-b684-009193463064"];
[user setIdentityProvider:@"AAD"];
[identity setUser:user];
[participants setIdentity:identity];
[participantsList addObject: participants];
payloadDictionary[@"participants"] = participantsList;
NSString *clientContext = @"f2fa86af-3c51-4bc2-8fc0-475452d9764f";
payloadDictionary[@"clientContext"] = clientContext;
NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
[urlRequest setHTTPBody:data];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<InvitationParticipantInfo> participantsList = new LinkedList<InvitationParticipantInfo>();
InvitationParticipantInfo participants = new InvitationParticipantInfo();
participants.replacesCallId = "a7ebfb2d-871e-419c-87af-27290b22e8db";
IdentitySet identity = new IdentitySet();
Identity user = new Identity();
user.id = "278405a3-f568-4b3e-b684-009193463064";
user.displayName = "string";
identity.user = user;
participants.identity = identity;
participantsList.add(participants);
String clientContext = "f2fa86af-3c51-4bc2-8fc0-475452d9764f";
graphClient.communications().calls("{id}").participants()
.invite(ParticipantInviteParameterSet
.newBuilder()
.withParticipants(participantsList)
.withClientContext(clientContext)
.build())
.buildRequest()
.post();
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
requestBody.SetParticipants( []InvitationParticipantInfo {
msgraphsdk.NewInvitationParticipantInfo(),
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"replacesCallId": "a7ebfb2d-871e-419c-87af-27290b22e8db",
}
}
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext)
callId := "call-id"
result, err := graphClient.Communications().CallsById(&callId).Participants().Invite(call-id).Post(requestBody)
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Import-Module Microsoft.Graph.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-MgInviteCommunicationCallParticipant -CallId $callId -BodyParameter $params
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
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
}
}
]
}
Eingeladene Teilnehmer löschen, bevor der Teilnehmer zur Teilnehmerliste hinzugefügt wird
DELETE https://graph.microsoft.com/beta/communications/calls/{id}/participants/{id}
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/communications/calls/{id}/participants/{id}"]]];
[urlRequest setHTTPMethod:@"DELETE"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
callId := "call-id"
participantId := "participant-id"
graphClient.Communications().CallsById(&callId).ParticipantsById(&participantId).Delete()
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 204 No Content