Skip to content

Commit 9d761da

Browse files
authored
Merge pull request #300775 from fuyan2024/fuyan/display-name-changed
Edited display name
2 parents 17f6328 + 3e42b08 commit 9d761da

File tree

4 files changed

+124
-0
lines changed

4 files changed

+124
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Display name changed
3+
titleSuffix: An Azure Communication Services how-to guide
4+
description: Use Azure Communication Services SDK to subscript events that participants' display name change
5+
author: fuyan
6+
ms.author: fuyan
7+
ms.service: azure-communication-services
8+
ms.subservice: calling
9+
ms.topic: how-to
10+
ms.date: 05/06/2025
11+
ms.custom: template-how-to
12+
13+
#Customer intent: As a developer, I want to learn how to subscribe events that participants' display name change using SDK.
14+
---
15+
16+
# Display name changed
17+
18+
This article describes how you can subscribe the Teams participants' display name changed events showing the old, new values, and the reason of the name change.
19+
20+
## Prerequisites
21+
22+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23+
- A deployed Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
24+
- A user access token to enable the calling client. For more information, see [Create and manage access tokens](../../quickstarts/identity/access-tokens.md).
25+
- Optional: Complete the article [Add voice calling to your app](../../quickstarts/voice-video-calling/getting-started-with-calling.md).
26+
27+
## Support
28+
29+
The following tables define support for display name change during Teams interop call/meeting in Azure Communication Services.
30+
31+
### Identities and call types
32+
33+
The following table shows display name change support for specific call types and identities.
34+
35+
|Identities | Teams meeting | Room | 1:1 call | Group call | 1:1 Teams interop call | Group Teams interop call |
36+
|-----------------------------|---------------|------|----------|------------|------------------------|--------------------------|
37+
|Communication Services user | ✔️ | | | | | |
38+
|Microsoft 365 user | ✔️ | | | | | |
39+
40+
### Operations
41+
42+
The following table shows support for individual APIs in the Calling SDK related to individual identity types. The display name change feature only supports these operations in Teams meetings.
43+
44+
|Operations | Communication Services user | Microsoft 365 user |
45+
|-----------------------------|---------------|--------------------------|
46+
| Check if Teams participant has display name changed | ✔️ | ✔️ |
47+
| Get notification that Teams participant display name changed | ✔️ | ✔️ |
48+
49+
50+
### SDK
51+
52+
The following tables show support for the display name change in individual Azure Communication Services SDK.
53+
54+
| Support status | Web | Web UI | iOS | iOS UI | Android | Android UI | Windows |
55+
|----------------|-----|--------|--------|--------|----------|--------|---------|
56+
| Is Supported | ✔️ | | | | | | |
57+
58+
59+
[!INCLUDE [Display name changed Client-side JavaScript](./includes/display-name-changed/display-name-changed-web.md)]
60+
61+
62+
## Next steps
63+
- [Learn how to manage calls](./manage-calls.md)
64+
- [Learn how to manage video](./manage-video.md)
65+
66+
## Related articles
67+
68+
To do, add Teams client doc here.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
author: fuyan
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 05/06/2025
6+
ms.author: fuyan
7+
---
8+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-web.md)]
9+
10+
## Implement display name change
11+
12+
`DisplayNameChanged` is an `event` and `hasDisplayNameChanged` is a property of the class `RemoteParticipant`. You can get remote participants on `Call` object `remoteParticipants` property from the Calling SDK:
13+
14+
```js
15+
const remoteParticipants = call.remoteParticipants;
16+
```
17+
18+
### Check if remote participant has display name change
19+
20+
To check if display name changed, use the `hasDisplayNameChanged` property of the class `RemoteParticipant` .
21+
22+
```js
23+
// check if remoteParticipant has display name changed
24+
const hasDisplayNameChanged = remoteParticipant.hasDisplayNameChanged;
25+
```
26+
27+
### Get notification that displays name changed
28+
29+
Use the `PropertyChangedEventWithArgs` listener to subscribe the display name change event
30+
31+
```js
32+
// get notification of a remote participant display name changed
33+
remoteParticipant.on('displayNameChanged', (args: {newValue?: string, oldValue?: string, reason?: DisplayNameChangedReason}) => {
34+
console.log(`Display name changed from ${oldValue} to ${newValue} due to ${reason}`);
35+
});
36+
```
37+
38+
## SDK compatibility
39+
40+
The following table shows the minimum version of SDK that supports individual APIs.
41+
42+
| Operations | Web | Web UI | iOS | iOS UI | Android | Android UI | Windows |
43+
|-------------|-----|--------|-----|--------|---------|------------|---------|
44+
|hasDisplayNameChanged property |1.34.1|||||||
45+
|DisplayNameChanged event |1.34.1|||||||
46+
47+

articles/communication-services/how-tos/calling-sdk/includes/events/events-web.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,13 @@ remoteParticipant.on('displayNameChanged', () => {
415415
});
416416
```
417417
418+
```javascript
419+
remoteParticipant.on('displayNameChanged', (args: {newValue?: string, oldValue?: string, reason?: DisplayNameChangedReason}) => {
420+
remoteParticipant.nameLabel.innerText = remoteParticipant.displayName;
421+
console.log(`Display name changed from ${oldValue} to ${newValue} due to ${reason}`);
422+
});
423+
```
424+
418425
### Event: `isSpeakingChanged`
419426
420427
The `isSpeakingChanged` when the dominant speaker in a call changes.

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,8 @@ items:
11941194
href: how-tos/calling-sdk/together-mode.md
11951195
- name: Control media access
11961196
href: how-tos/calling-sdk/media-access.md
1197+
- name: Display name changed
1198+
href: how-tos/calling-sdk/display-name-changed.md
11971199
- name: Teams Phone extensibility
11981200
items:
11991201
- name: Overview

0 commit comments

Comments
 (0)