Share via


Rooms - Remove Participants

Remove participants from a room.

POST {endpoint}/rooms/{roomId}/participants:remove?api-version=2022-02-01

URI Parameters

Name In Required Type Description
endpoint
path True

string (uri)

The endpoint of the Azure Communication resource.

roomId
path True

string

Room id to remove the participants from.

api-version
query True

string

Version of API to invoke.

Request Header

Name Required Type Description
Authorization True

string

An ACS (Azure Communication Services) user access token.

Request Body

Name Required Type Description
participants True

RoomParticipant[]

Participants to be removed from a room.

Responses

Name Type Description
200 OK

ParticipantsCollection

The participants were successfully deleted. The action returns an updated list of participants.

Other Status Codes

CommunicationErrorResponse

Error response

Headers

x-ms-error-code: string

Security

Authorization

An ACS (Azure Communication Services) user access token.

Type: apiKey
In: header

Examples

Remove participant

Sample request

POST https://contoso.communication.azure.com//rooms/99199690362660524/participants:remove?api-version=2022-02-01

{
  "participants": [
    {
      "communicationIdentifier": {
        "rawId": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000666",
        "communicationUser": {
          "id": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000666"
        }
      },
      "role": "Presenter"
    }
  ]
}

Sample response

{
  "participants": [
    {
      "communicationIdentifier": {
        "rawId": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000777",
        "communicationUser": {
          "id": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000777"
        }
      },
      "role": "Attendee"
    }
  ]
}

Definitions

Name Description
CommunicationIdentifierModel

Identifies a participant in Azure Communication services. A participant is, for example, an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set.

ParticipantsCollection

Collection of participants in a room.

RemoveParticipantsRequest

Participants to be removed from a room.

RoleType

The Role of a room participant.

RoomParticipant

A participant of the room.

CommunicationIdentifierModel

Identifies a participant in Azure Communication services. A participant is, for example, an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set.

Name Type Description
communicationUser

CommunicationUserIdentifierModel

rawId

string

Raw id of the identifier. Optional in requests, required in responses.

ParticipantsCollection

Collection of participants in a room.

Name Type Description
participants

RoomParticipant[]

Room Participants.

RemoveParticipantsRequest

Participants to be removed from a room.

Name Type Description
participants

RoomParticipant[]

Participants to be removed from a room.

RoleType

The Role of a room participant.

Value Description
Presenter
Attendee
Consumer

RoomParticipant

A participant of the room.

Name Type Description
communicationIdentifier

CommunicationIdentifierModel

Identifies a participant in Azure Communication services. A participant is, for example, an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set.

role

RoleType

The Role of a room participant.