Skip to content

Commit a59d737

Browse files
committed
Addressed comments
1 parent 2d9b28c commit a59d737

File tree

2 files changed

+41
-14
lines changed

2 files changed

+41
-14
lines changed

articles/communication-services/how-tos/calling-sdk/lobby-admit-and-reject.md

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ ms.custom: template-how-to
1212

1313
---
1414
[!INCLUDE [Install SDK](../calling-sdk/includes/install-sdk/install-sdk-web.md)]
15-
Lobby admit and reject are the apis on `Call` or `TeamsCall`. It allows user to admit and reject participants from Teams meeting lobby. You first need to import `Call` or `TeamsCall` deom the Calling SDK:
15+
Lobby admit and reject are the apis on `Call` or `TeamsCall`. It allows user to admit and reject participants from Teams meeting lobby.
1616

1717
# Manage participants in Teams meeting Lobby
1818

19-
In this article you will learn how to admit and reject participants from Microsoft Teams meetings lobby by using Azure Communication Service calling SDKs.
19+
In this article, you will learn how to admit and reject participants from Microsoft Teams meetings lobby by using Azure Communication Service calling SDKs.
2020

2121
## Prerequisites
2222

@@ -25,30 +25,55 @@ In this article you will learn how to admit and reject participants from Microso
2525
- A user access token to enable the calling client. For more information, see [Create and manage access tokens](../../quickstarts/access-tokens.md).
2626
- Optional: Complete the quickstart to [add voice calling to your application](../../quickstarts/voice-video-calling/getting-started-with-calling.md)
2727

28+
User ends up in the lobby depending on Microsoft Teams configuration. The controls are described here:
29+
[Learn more about Teams configuration ](https://learn.microsoft.com/en-us/azure/communication-services/concepts/interop/guest/teams-administration)
30+
2831
Microsoft 365 or Azure Communication Services users can admit or reject users from lobby, if they are connected to Teams meeting and have Organizer, Co-organizer, or Presenter meeting role.
2932
[Learn more about meeting roles](https://support.microsoft.com/office/roles-in-a-teams-meeting-c16fa7d0-1666-4dde-8686-0a0bfe16e019)
3033

34+
To update or check current meeting join & lobby policies in Teams admin center:
35+
[Learn more about Teams policies ](https://learn.microsoft.com/en-us/microsoftteams/settings-policies-reference#automatically-admit-people)
36+
37+
38+
### Get remote participant properties
39+
40+
The first thing is to get the `Call` or `TeamsCall` object of admitter: [Learn how to join Teams meeting](./teams-interoperability.md)
41+
42+
To know who is in the lobby, you could check the state of a remote participant. The `remoteParticipant` with `InLobby` state indicates that remote participant is in lobby.
43+
To get the `remoteParticipants` collection:
44+
```js
45+
call.remoteParticipants; // [remoteParticipant, remoteParticipant....]
46+
```
47+
To get the state of a remote participant:
48+
```js
49+
const state = remoteParticipant.state;
50+
```
51+
52+
Before admit or reject `remoteParticipant` with `InLobby` state, you could get the identifier for a remote participant:
53+
```js
54+
const identifier = remoteParticipant.identifier;
55+
```
56+
57+
The `identifier` can be one of the following `CommunicationIdentifier` types:
58+
59+
- `{ communicationUserId: '<COMMUNICATION_SERVICES_USER_ID'> }`: Object representing the Azure Communication Services user.
60+
- `{ phoneNumber: '<PHONE_NUMBER>' }`: Object representing the phone number in E.164 format.
61+
- `{ microsoftTeamsUserId: '<MICROSOFT_TEAMS_USER_ID>', isAnonymous?: boolean; cloud?: "public" | "dod" | "gcch" }`: Object representing the Teams user.
62+
- `{ id: string }`: object representing identifier that doesn't fit any of the other identifier types
63+
64+
### Start lobby operations
65+
3166
To admit, reject or admit all users from the lobby, you can use the `admit`, `rejectParticipant` and `admitAll` asynchronous APIs:
3267

3368
You can admit specific user to the Teams meeting from lobby by calling the method `admit` on the object `TeamsCall` or `Call`. The method accepts identifiers `MicrosoftTeamsUserIdentifier`, `CommunicationUserIdentifier`, `PhoneNumberIdentifier` or `UnknownIdentifier` as input.
3469
```js
35-
const teamsUserIdentifier = { microsoftTeamsUserId: '<MICROSOFT_TEAMS_USER_ID>' };
36-
const userIdentifier = { communicationUserId: '<COMMUNICATION_SERVICES_USER_ID>' };
37-
const phoneUserIdentifier = { phoneNumber: '<PHONE_NUMBER>' }
38-
await call.admit(teamsUserIdentifier);
39-
await call.admit(userIdentifier);
40-
await call.admit(phoneUserIdentifier);
70+
await call.admit(identifier);
4171
```
4272

4373
You can also reject specific user to the Teams meeting from lobby by calling the method `rejectParticipant` on the object `TeamsCall` or `Call`. The method accepts identifiers `MicrosoftTeamsUserIdentifier`, `CommunicationUserIdentifier`, `PhoneNumberIdentifier` or `UnknownIdentifier` as input.
4474

4575
```js
46-
const teamsUserIdentifier = { microsoftTeamsUserId: '<MICROSOFT_TEAMS_USER_ID>' };
47-
const userIdentifier = { communicationUserId: '<COMMUNICATION_SERVICES_USER_ID>' };
48-
const phoneUserIdentifier = { phoneNumber: '<PHONE_NUMBER>' }
49-
await call.rejectParticipant(teamsUserIdentifier);
50-
await call.rejectParticipant(userIdentifier);
51-
await call.rejectParticipant(phoneUserIdentifier);
76+
await call.rejectParticipant(identifier);
5277
```
5378

5479
You can also admit all users in the lobby by calling the method `admitAll` on the object `TeamsCall` or `Call`.

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ items:
425425
href: how-tos/calling-sdk/transfer-calls.md
426426
- name: Join a Teams meeting
427427
href: how-tos/calling-sdk/teams-interoperability.md
428+
- name: Manage participants in Teams meeting Lobby
429+
href: how-tos/calling-sdk/lobby-admit-and-reject.md
428430
- name: Subscribe to SDK events
429431
href: how-tos/calling-sdk/events.md
430432
- name: Check if user is running supported browser

0 commit comments

Comments
 (0)