|
| 1 | +--- |
| 2 | +title: Teams calling and chat interoperability |
| 3 | +titleSuffix: An Azure Communication Services concept document |
| 4 | +description: Teams calling and chat interoperability |
| 5 | +author: tomkau |
| 6 | +ms.author: tomkau |
| 7 | +ms.date: 10/15/2021 |
| 8 | +ms.topic: conceptual |
| 9 | +ms.service: azure-communication-services |
| 10 | +ms.subservice: teams-interop |
| 11 | +--- |
| 12 | + |
| 13 | +# Teams Interoperability: Calling and chat |
| 14 | + |
| 15 | +> [!IMPORTANT] |
| 16 | +> Calling and chat interoperability is in private preview, and restricted to selected Azure Communication Services early adopters. |
| 17 | +> |
| 18 | +> Private Preview APIs and SDKs are provided without a service-level agreement, and are not appropriate for production workloads and should only be used with test users and test data. Certain features might not be supported or might have constrained capabilities. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). |
| 19 | +
|
| 20 | +As part of this preview, the Azure Communication Services SDKs can be used to build applications that enable bring your own identity (BYOI) users to initiate ad hoc 1:1 calls or ad hoc 1:1 and group chats with Teams users. [Standard ACS pricing](https://azure.microsoft.com/pricing/details/communication-services/) applies to these users, but there's no additional fee for the interoperability capability itself. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +## Enabling calling and chat interoperability in your Teams tenant |
| 25 | +To enable ad hoc calling and chat between your Communication Services users and your Teams tenant, use the new Teams PowerShell cmdlet [Set-CsTeamsAcsFederationConfiguration](/powershell/module/teams/set-csteamsacsfederationconfiguration). This cmdlet is only available to participants in the private preview. |
| 26 | + |
| 27 | +Custom applications built with Azure Communication Services to connect and communicate with Teams users can be used by end users or by bots, and there is no differentiation in how they appear to Teams users, unless the developer of the application explicitly indicates this as part of the communication. |
| 28 | + |
| 29 | +To initiate a call or chat with a Teams user, the user’s Azure Active Directory (AAD) object ID is required. This can be obtained using [Microsoft Graph API](/graph/api/resources/users) or from your on-premises directory if you are using [Azure AD Connect](/azure/active-directory/hybrid/how-to-connect-sync-whatis) (or some other mechanism) to synchronize your identity data between your on-premises environment and AAD. |
| 30 | + |
| 31 | +## Calling |
| 32 | +With ad hoc calling, an ACS user or endpoint can initiate a 1:1 call with a Teams, identified by the user’s Azure Active Directory (AAD) object ID. You can easily modify an existing application that calls other ACS users to instead call a Teams user. |
| 33 | + |
| 34 | +[Manage calls - An Azure Communication Services how-to guide | Microsoft Docs](../../how-tos/calling-sdk/manage-calls.md?pivots=platform-web) |
| 35 | + |
| 36 | +Calling another ACS user: |
| 37 | +```js |
| 38 | +const acsCallee = { communicationUserId: <'ACS_USER_ID>' } |
| 39 | +const call = callAgent.startCall([acsCallee]); |
| 40 | +``` |
| 41 | + |
| 42 | +Calling a Teams user: |
| 43 | +```js |
| 44 | +const teamsCallee = { microsoftTeamsUserId: '<Teams User AAD Object ID>' } |
| 45 | +const call = callAgent.startCall([teamsCallee]); |
| 46 | +``` |
| 47 | + |
| 48 | +**Limitations and known issues** |
| 49 | +- Communication Services users are not displayed correctly in the Call history |
| 50 | + |
| 51 | + |
| 52 | +## Chat |
| 53 | +With ad hoc chat, Communication Services users or endpoints can initiate 1:n chat with Teams users, identified by the user’s Azure Active Directory (AAD) object ID. You can easily modify an existing application that creates chats with other ACS users, to instead create chats with Teams users: |
| 54 | + |
| 55 | +[Quickstart: Add Chat to your App](../../quickstarts/chat/get-started.md?pivots=programming-language-javascript) |
| 56 | + |
| 57 | +Creating a chat with a Teams user: |
| 58 | +```js |
| 59 | +async function createChatThread() { |
| 60 | +const createChatThreadRequest = { topic: "Hello, World!" }; |
| 61 | +const createChatThreadOptions = { |
| 62 | + participants: [ { |
| 63 | + id: { microsoftTeamsUserId: '<TEAMS_USER_ID>' }, |
| 64 | + displayName: '<USER_DISPLAY_NAME>' } |
| 65 | + ] }; |
| 66 | +const createChatThreadResult = await chatClient.createChatThread( |
| 67 | +createChatThreadRequest, createChatThreadOptions ); |
| 68 | +const threadId = createChatThreadResult.chatThread.id; return threadId; } |
| 69 | +``` |
| 70 | + |
| 71 | +**Supported functionality** |
| 72 | +- Send/receive messages (type: text, rich text, emoticons) |
| 73 | +- Communication Services user can edit sent messages |
| 74 | +- Delete sent messages |
| 75 | +- Receive real-time notifications (thread and message related events supported by ACS currently) |
| 76 | +- Send & receive Typing indicators |
| 77 | +- Send & receive Read receipts |
| 78 | +- Add participant and share message history: Teams user can add Teams users only. Communication Services user can add Teams and Communication Services users. |
| 79 | +- Remove existing participant from chat |
| 80 | +- Leave chat |
| 81 | +- Update chat topic |
| 82 | +- Communication Services user can delete the chat. |
| 83 | + |
| 84 | + |
| 85 | +**Limitations and known issues** |
| 86 | +- Editing of messages by the Teams user fails. |
| 87 | +- Deletion of a thread by the Communication Services user removes the message history for the Teams user and removes the Teams user from the thread. |
| 88 | +- The Teams client UI for external users is inconsistent. |
| 89 | + |
| 90 | + |
| 91 | +## Privacy |
| 92 | +Interoperability between Azure Communication Services and Microsoft Teams enables your applications and users to participate in Teams calls, meetings, and chat. It is your responsibility to ensure that the users of your application are notified when recording or transcription are enabled in a Teams call or meeting. |
| 93 | + |
| 94 | +Microsoft will indicate to you via the Azure Communication Services API that recording or transcription has commenced and you must communicate this fact, in real time, to your users within your application's user interface. You agree to indemnify Microsoft for all costs and damages incurred as a result of your failure to comply with this obligation. |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
0 commit comments