Skip to content

Commit 35d02ae

Browse files
committed
finished content files
1 parent f203571 commit 35d02ae

11 files changed

+406
-7
lines changed
-153 KB
Loading

articles/communication-services/concepts/interop/tpe/teams-phone-extensibility-client-capabilities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ The following list of capabilities is supported for scenarios where at least one
115115

116116
## Related articles
117117

118-
- [Teams Phone extensibility overview](./teams-phone-overview.md)
118+
- [Teams Phone extensibility overview](./teams-phone-extensibility-overview.md)
119119
- [Teams Phone extensibility FAQ](./teams-phone-extensibility-faq.md)

articles/communication-services/concepts/interop/tpe/teams-phone-extensibility-connectivity-cost.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ End users can take advantage of their Teams Calling plans or any of the connecti
7070

7171
## Related articles
7272

73-
- [Teams Phone extensibility overview](./teams-phone-overview.md)
73+
- [Teams Phone extensibility overview](./teams-phone-extensibility-overview.md)
7474
- [Teams Phone extensibility FAQ](./teams-phone-extensibility-faq.md)

articles/communication-services/concepts/interop/tpe/teams-phone-extensibility-faq.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,6 @@ While it's not mandatory to be certified in order to start building solutions, w
8686

8787
## Related articles
8888

89+
- [Teams Phone extensibility overview](./teams-phone-extensibility-overview.md)
8990
- [Teams Phone System extensibility quickstart](../../../quickstarts/tpe/teams-phone-extensibility-quickstart.md)
9091
- [Cost and connectivity options](teams-phone-extensibility-connectivity-cost.md)

articles/communication-services/concepts/interop/tpe/teams-phone-extensibility-troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,5 @@ This issue arises when the provisioning of the Resource Account is incomplete or
149149

150150
## Related articles
151151

152-
- [Teams Phone extensibility overview](./teams-phone-overview.md)
152+
- [Teams Phone extensibility overview](./teams-phone-extensibility-overview.md)
153153
- [Teams Phone extensibility FAQ](./teams-phone-extensibility-faq.md)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Teams Phone extensibility provisioning
3+
titleSuffix: An Azure Communication Services article
4+
description: This article describes how to provision for Teams Phone extensibility.
5+
author: vac0224
6+
ms.service: azure-communication-services
7+
ms.subservice: teams-interop
8+
ms.date: 05/22/2025
9+
ms.topic: conceptual
10+
ms.author: henikaraa
11+
ms.custom: public_preview
12+
services: azure-communication-services
13+
---
14+
15+
# Provisioning and authorization
16+
17+
[!INCLUDE [public-preview-notice.md](../../../includes/public-preview-include-document.md)]
18+
19+
## Provisioning
20+
21+
A Teams resource account (RA) must include an association to the Contact Center as a Service (CCaaS) Azure Communication Services Resource. The RA provisioning process to a CCaaS app follows a similar process used today to assign an RA to MS Teams Call Queues and Auto Attendants. For more information, see [Manage Resource Accounts](/microsoftteams/manage-resource-accounts).
22+
23+
To provision the RA for the CCaaS service the Teams Admin uses a cmdlet to create (or change) the RA using the CCaaS AppID. For more information, see the article on GitHub [Register calling bot](https://microsoftgraph.github.io/microsoft-graph-comms-samples/docs/articles/calls/register-calling-bot.html).
24+
25+
The Teams admin then assigns the Azure Communication Services Resource ID used by the CCaaS
26+
service to the RA. The CCaaS admin provides these IDs to the Teams admin. Once the RA is assigned the CCaaS app can retrieve the Azure Communication Services Resource IDs from MS Graph, including their Display Name and
27+
Phone number. The RA assignment also provides access consent for the RA.
28+
29+
:::image type="content" source="./media/tpe-provisioning-call-flow.png" alt-text="Diagram shows the Provisioning flow from Resource Account through number acquisition and number assignment to finish provisioning." lightbox="./media/tpe-provisioning-call-flow.png":::
30+
31+
## Authorization
32+
33+
### Custom Teams Client Authorization for Teams Persona
34+
35+
The CCaaS and Microsoft 365 administrators must authorize the use of Teams Phone in the contact center for both the agent (custom Teams client for Teams Persona) and server-side experiences. The custom Teams client authorization is a one-time process for the CCaaS client app (Calling
36+
SDK).
37+
38+
We use a custom Teams endpoint client built using Azure Communication Services Client SDK. The process to authorize the custom client is defined here and there is no difference for this
39+
release. For more information, see [Manage Teams Identity](../../../quickstarts/manage-teams-identity.md).
40+
41+
### Server Authorization
42+
43+
After the Teams admin creates one or more Teams Resource Accounts, the CCaaS administrators must authorize the CCaaS Service to receive Teams calls. Authorization is a one-time process for
44+
the CCaaS server app (Call Automation SDK). The CCaaS administrator initiates the consent process in their CCaaS Administration Portal.
45+
46+
The administrator needs to set up / enable Teams calls (Contoso implementation specific) to their CCaaS service. This setup initiates a backend process by the CCaaS service and uses a new Microsoft Graph API to fetch the Teams Resource Accounts and presents them to the CCaaS
47+
admin user. The CCaaS admin selects a Teams Resource Account. Then the CCaaS Admin function triggers a new Azure Communication Services Consent API to link the Teams Resource Account with the Azure Communication Services Resource ID.
48+
49+
### Custom Teams Client Authorization for CCaaS Persona
50+
51+
When a CCaaS decides to use CCaaS Persona, the CCaaS and Microsoft 365 administrators must also authorize the use of Teams Phone in the contact center for this custom client. The custom client authorization is a one-time process for the CCaaS client app (Calling SDK).
52+
53+
The process starts with a Microsoft 365 Admin installing a Microsoft Entra ID app. Once the app is installed, the CCaaS developer creates their own Microsoft Entra App and then grant permissions to the app created by the Microsoft 365 Admin to the CCaaS app.
54+
55+
The CCaaS developer then consumes a new consent API to provide consent to either the Teams Tenant, Teams authorized user, or a Microsoft Entra group. The implementor needs to choose which is best for their customer and organization based on policy. Once the admin provides consent, the CCaaS developer can then develop the runtime flows to exchange a Microsoft Entra token for an Access token and use the Access token in the Azure Communication Services client SDK to
56+
instantiate a calling agent to make and receive call.
57+
58+
## Next steps
59+
60+
- [Teams Phone System extensibility quickstart](../../../quickstarts/tpe/teams-phone-extensibility-quickstart.md)
61+
- [Cost and connectivity options](teams-phone-extensibility-connectivity-cost.md)
62+
63+
## Related articles
64+
65+
- [Teams Phone extensibility overview](./teams-phone-extensibility-overview.md)
66+
- [Teams Phone extensibility client capabilities](./teams-phone-extensibility-client-capabilities.md)
67+
- [Teams Phone extensibility FAQ](./teams-phone-extensibility-faq.md)
68+
- [Teams Phone extensibility troubleshooting](./teams-phone-extensibility-troubleshooting.md)

articles/communication-services/quickstarts/tpe/teams-phone-extensibility-access-teams-phone.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The Azure Communication Services Resource Owner needs to run the following API o
3434

3535

3636
1. {YOUR-ACS-RESOURCE-ENDPOINT} in the request URI (RURI) path is the Azure Communication Services Resource fully qualified domain name (FQDN) from Azure.
37-
1. {YOUR-RESOURCE-ACCOUNT-GUID} parameter in the RURI, is the oid value returned by the Graph API from the previous step. Alternatively for one off manual provisioning, the [Get-CsOnlineApplicationInstance (MicrosoftTeamsPowerShell)](https://learn.microsoft.com/en-us/powershell/module/teams/get-csonlineapplicationinstance?view=teams-ps) cmdlet returns the ObjectId and that ID is the YOUR-RESOURCE-ACCOUNT-GUID.
37+
1. {YOUR-RESOURCE-ACCOUNT-GUID} parameter in the RURI, is the oid value returned by the Graph API from the previous step. Alternatively for one off manual provisioning, the [Get-CsOnlineApplicationInstance (MicrosoftTeamsPowerShell)](/powershell/module/teams/get-csonlineapplicationinstance) cmdlet returns the ObjectId and that ID is the YOUR-RESOURCE-ACCOUNT-GUID.
3838
1. The {TENANT-GUID} in the RURI path is the Teams Tenant GUID.
3939
1. The {principalType} in the body is `teamsResourceAccount` because we're consenting to a Teams Resource Account for Teams Phone Extensibility.
4040

@@ -204,9 +204,9 @@ GET {endpoint}/access/teamsExtension/tenants/87d349ed-44d7-43e1-9a83-5f2406dee5b
204204
## Next steps
205205

206206
> [!div class="nextstepaction"]
207-
> [REST API for Teams Phone Extensibility](./teams-phone-extensiblity-rest-api.md)
207+
> [REST API for Teams Phone extensibility](./teams-phone-extensiblity-rest-api.md)
208208
209209
## Related articles
210210

211-
- [Teams Phone extensibility overview](../../concepts/interop/tpe/teams-phone-overview.md)
211+
- [Teams Phone extensibility overview](../../concepts/interop/tpe/teams-phone-extensibility-overview.md)
212212
- [Teams Phone System extensibility quick start](./teams-phone-extensibility-quickstart.md)
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
title: Answer Teams Phone calls from Call Automation
3+
titleSuffix: An Azure Communication Services article
4+
description: This article describes how to receive and answer incoming Teams Phone Extensibility calls on Azure Communication Services.
5+
author: sofiar
6+
manager: miguelher
7+
services: azure-communication-services
8+
ms.author: sofiar
9+
ms.date: 05/19/2025
10+
ms.topic: quickstart
11+
ms.service: azure-communication-services
12+
ms.subservice: identity
13+
---
14+
15+
# Answer Teams Phone calls from Call Automation
16+
17+
Use Azure Communication Services Call Automation to receive and answer calls for a Teams resource account.
18+
19+
[!INCLUDE [public-preview-notice.md](../../includes/public-preview-include-document.md)]
20+
21+
## Prerequisites
22+
23+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
24+
25+
- A Communication Services resource, see [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
26+
27+
- A configured Event Grid endpoint. [Incoming call concepts - An Azure Communication Services concept document](../../concepts/call-automation/incoming-call-notification.md#receiving-an-incoming-call-notification-from-event-grid)
28+
29+
- A Microsoft Teams resource account with an associated phone number. [Create a new Teams Resource account](/powershell/module/teams/new-csonlineapplicationinstance)
30+
31+
- Create and host an Azure Dev Tunnel. [Instructions here](/azure/developer/dev-tunnels/get-started).
32+
33+
## Associate your Teams resource account with your Communication Services resource
34+
35+
Execute the following command. Make sure you have your Azure Communication Services resource identifier ready. To find it, see [Get an immutable resource identifier](/azure/communication-services/concepts/troubleshooting-info#get-an-immutable-resource-id).
36+
37+
```powershell
38+
Set-CsOnlineApplicationInstance -Identity <appIdentity> -AcsResourceId <acsResourceId>
39+
```
40+
41+
For more details, follow this guide: [Associate your Azure Communication Services resource with the Teams Resource account](/powershell/module/teams/set-csonlineapplicationinstance#-acsresourceid)
42+
43+
## Configure your Communication Services resource to accept calls for the Teams resource account
44+
45+
Send a request to the Microsoft Teams Extension access assignments API to allow receiving calls for the Teams resource account. For more details on how to authenticate the web request, follow this guide: [Authentication](/rest/api/communication/authentication)
46+
47+
The following example shows a request for a Teams Tenant with identifier `87d349ed-44d7-43e1-9a83-5f2406dee5bd` and a Teams resource account oid with identifier `e5b7f628-ea94-4fdc-b3d9-1af1fe231111`.
48+
49+
```http
50+
PUT {endpoint}/access/teamsExtension/tenants/87d349ed-44d7-43e1-9a83-5f2406dee5bd/assignments/e5b7f628-ea94-4fdc-b3d9-1af1fe231111?api-version=2025-03-02-preview
51+
52+
{
53+
"principalType" : "teamsResourceAccount",
54+
}
55+
```
56+
57+
The {principalType} needs to be `teamsResourceAccount`.
58+
59+
### Response
60+
61+
The following example shows the response.
62+
63+
```http
64+
HTTP/1.1 201 Created
65+
Content-type: application/json
66+
67+
{
68+
"objectId": "e5b7f628-ea94-4fdc-b3d9-1af1fe231111",
69+
"tenantId": "87d349ed-44d7-43e1-9a83-5f2406dee5bd",
70+
"principalType" : "teamsResourceAccount",
71+
}
72+
```
73+
74+
## Stop accepting calls for the Teams resource account
75+
76+
Send a request to the Microsoft Teams Extension access assignments API to delete the entry for your Teams resource account.
77+
78+
```http
79+
DELETE {endpoint}/access/teamsExtension/assignments/e5b7f628-ea94-4fdc-b3d9-1af1fe231111?api-version=2025-03-02-preview
80+
```
81+
82+
### Response
83+
84+
```http
85+
HTTP/1.1 204 NoContent
86+
Content-type: application/json
87+
88+
{}
89+
```
90+
91+
To verify that the Teams resource account is no longer linked with the Communication Services resource, you can send a GET request to the Microsoft Teams Extension access assignments API. Verify that its response status code is 404.
92+
93+
```http
94+
GET {endpoint}/access/teamsExtension/assignments/e5b7f628-ea94-4fdc-b3d9-1af1fe231111?api-version=2025-03-02-preview
95+
```
96+
97+
## Receive and answer incoming calls
98+
99+
### Setup and host your Azure DevTunnel
100+
101+
DevTunnels create a persistent endpoint URL which allows anonymous access. We use this endpoint to notify your application of calling events from the Azure Communication Services Call Automation service.
102+
103+
```powershell
104+
devtunnel create --allow-anonymous
105+
106+
devtunnel port create -p 8080
107+
108+
devtunnel host
109+
```
110+
111+
### Handle Incoming Call event and answer the call
112+
113+
```csharp
114+
app.MapPost("/api/incomingCall", async (
115+
[FromBody] EventGridEvent[] eventGridEvents,
116+
ILogger<Program> logger) =>
117+
{
118+
if (eventGridEvent.TryGetSystemEventData(out object systemEvent))
119+
{
120+
switch (systemEvent)
121+
{
122+
case SubscriptionValidationEventData subscriptionValidated:
123+
var responseData = new SubscriptionValidationResponse
124+
{
125+
ValidationResponse = subscriptionValidationEventData.ValidationCode
126+
};
127+
return Results.Ok(responseData);
128+
129+
case AcsIncomingCallEventData incomingCall:
130+
var callbackUri = new Uri(new Uri(devTunnelUri), $"/api/callbacks");
131+
var options = new AnswerCallOptions(incomingCallContext, callbackUri);
132+
133+
AnswerCallResult answerCallResult = await callAutomationClient.AnswerCallAsync(options);
134+
logger.LogInformation($"Answered call for connection id: {answerCallResult.CallConnection.CallConnectionId}");
135+
136+
//Use EventProcessor to process CallConnected event
137+
138+
var answerResult = await answerCallResult.WaitForEventProcessorAsync();
139+
if (answerResult.IsSuccess)
140+
{
141+
logger.LogInformation($"Call connected event received for connection id: {answerResult.SuccessResult.CallConnectionId}");
142+
var callConnectionMedia = answerCallResult.CallConnection.GetCallMedia();
143+
}
144+
return Results.Ok();
145+
146+
default:
147+
logger.LogInformation($"Received unexpected event of type {eventGridEvent.EventType}");
148+
return Results.BadRequest();
149+
}
150+
}
151+
return Results.Ok();
152+
});
153+
```
154+
### Sample Incoming Call event with Teams resource account identifier and custom context (VoIP and SIP)
155+
156+
```json
157+
{
158+
"to": {
159+
"kind": "unknown",
160+
"rawId": "28:orgid:cc123456-5678-5678-1234-ccc123456789"
161+
},
162+
"from": {
163+
"kind": "phoneNumber",
164+
"rawId": "4:+12065551212",
165+
"phoneNumber": {
166+
"value": "+12065551212"
167+
}
168+
},
169+
"serverCallId": "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkudGVhbXMubWljcm9zb2Z0LmNvbS9hcGkvdjIvZXAvY29udi11c3dlLTAyLXNkZi1ha3MuY29udi5za3lwZS5jb20vY29udi9fVERMUjZVS3BrT05aTlRMOHlIVnBnP2k9MTAtNjAtMTMtMjE2JmU9NjM4NTMwMzUzMjk2MjI3NjY1",
170+
"callerDisplayName": "+12065551212",
171+
"customContext":
172+
{
173+
"voipHeaders":
174+
{
175+
"X-myCustomVoipHeaderName": "myValue"
176+
},
177+
},
178+
"incomingCallContext": "<CALL_CONTEXT VALUE>",
179+
"correlationId": "2e0fa6fe-bf3e-4351-9beb-568add4f5315"
180+
}
181+
```
182+
183+
## Next steps
184+
185+
> [!div class="nextstepaction"]
186+
> [REST API for Teams Phone extensibility](./teams-phone-extensiblity-rest-api.md)
187+
188+
## Related articles
189+
190+
- [Teams Phone extensibility overview](../../concepts/interop/tpe/teams-phone-extensibility-overview.md)
191+
- [Teams Phone System extensibility quick start](./teams-phone-extensibility-quickstart.md)

articles/communication-services/quickstarts/tpe/teams-phone-extensibility-quickstart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,4 +483,5 @@ await callConnection.TransferCallToParticipantAsync(new TransferToParticipantOpt
483483

484484
## Related articles
485485

486-
- [Teams Phone extensibility overview](../../concepts/interop/tpe/teams-phone-overview.md)
486+
- [Teams Phone extensibility overview](../../concepts/interop/tpe/teams-phone-extensibility-overview.md)
487+
- [REST API for Teams Phone extensibility](./teams-phone-extensiblity-rest-api.md)

0 commit comments

Comments
 (0)