Skip to content

Commit 0a0a12a

Browse files
authored
Merge pull request #292816 from MicrosoftDocs/main
1/9/2025 11:00 AM IST Publish
2 parents 478fce2 + c06907d commit 0a0a12a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+639
-228
lines changed
Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Quickstart - Create and manage access tokens
3-
titleSuffix: An Azure Communication Services quickstart
4-
description: Learn how to manage identities and access tokens by using the Azure Communication Services Identity SDK.
5-
author: tomaschladek
6-
manager: nmurav
2+
title: Create and manage access tokens
3+
titleSuffix: An Azure Communication Services guide
4+
description: Manage identities and access tokens using the Azure Communication Services Identity SDK.
5+
author: soricos85
6+
manager: dariagrigoriu
77
services: azure-communication-services
8-
ms.author: tchladek
8+
ms.author: dariac
99
ms.date: 11/17/2021
1010
ms.topic: quickstart
1111
ms.service: azure-communication-services
@@ -14,11 +14,11 @@ zone_pivot_groups: acs-azcli-js-csharp-java-python-portal-nocode
1414
ms.custom: mode-other, devx-track-azurecli, devx-track-extended-java, devx-track-js, devx-track-python
1515
---
1616

17-
# Quickstart: Create and manage access tokens
17+
# Create and manage access tokens
1818

19-
Access tokens let Azure Communication Services SDKs [authenticate](../../concepts/authentication.md) directly against Azure Communication Services as a particular identity. You'll need to create access tokens if you want your users to join a call or chat thread within your application.
19+
Access tokens enable Azure Communication Services SDKs to [authenticate](../../concepts/authentication.md) directly against Azure Communication Services as a particular identity. You need to create access tokens if you want your users to join a call or chat thread within your application.
2020

21-
In this quickstart, you'll learn how to use the Azure Communication Services SDKs to create identities and manage your access tokens. For production use cases, we recommend that you generate access tokens on a [server-side service](../../concepts/client-and-server-architecture.md).
21+
This article describes how to use the Azure Communication Services SDKs to create identities and manage your access tokens. For production use cases, we recommend that you generate access tokens on a server-side service as described in [Mobile architecture design](../../concepts/client-and-server-architecture.md).
2222

2323
::: zone pivot="platform-azcli"
2424
[!INCLUDE [Azure CLI](./includes/access-tokens/access-token-az-cli.md)]
@@ -41,55 +41,39 @@ In this quickstart, you'll learn how to use the Azure Communication Services SDK
4141
::: zone-end
4242

4343
::: zone pivot="platform-azportal"
44-
[!INCLUDE [AzPortal](./includes/access-tokens/access-token-az-portal.md)]
44+
[!INCLUDE [Azure Portal](./includes/access-tokens/access-token-az-portal.md)]
4545
::: zone-end
4646

4747
::: zone pivot="platform-nocode"
48-
[!INCLUDE [No Code](./includes/access-tokens/access-token-no-code.md)]
48+
[!INCLUDE [Power Platform](./includes/access-tokens/access-token-no-code.md)]
4949
::: zone-end
5050

5151
## Use identity for monitoring and metrics
5252

53-
The user ID is intended to act as a primary key for logs and metrics that are collected through Azure Monitor. To view all of a user's calls, for example, you can set up your authentication in a way that maps a specific Azure Communication Services identity (or identities) to a single user.
53+
The user ID acts as a primary key for logs and metrics collected through Azure Monitor. To view all of a user's calls, for example, you can set up your authentication to map a specific Azure Communication Services identity (or identities) to a single user.
5454

55-
Learn more about [authentication concepts](../../concepts/authentication.md), call diagnostics through [log analytics](../../concepts/analytics/log-analytics.md), and [metrics](../../concepts/metrics.md) that are available to you.
55+
For more information, see:
56+
- [Authentication concepts](../../concepts/authentication.md)
57+
- [Call diagnostics through log analytics](../../concepts/analytics/log-analytics.md)
58+
- [Metrics](../../concepts/metrics.md).
5659

5760
## Clean up resources
5861

59-
To clean up and remove a Communication Services subscription, delete the resource or resource group. Deleting a resource group also deletes any other resources that are associated with it. For more information, see the "Clean up resources" section of [Create and manage Communication Services resources](../create-communication-resource.md#clean-up-resources).
62+
To clean up and remove a Communication Services subscription, delete the resource or resource group. Deleting a resource group also deletes any other resources associated with it. For more information, see [Create and manage Communication Services resources > Clean up resources](../create-communication-resource.md#clean-up-resources).
6063

61-
::: zone pivot="platform-nocode"
62-
To clean up your logic app workflow and related resources, review [how to clean up Azure Logic Apps resources](../../../logic-apps/quickstart-create-example-consumption-workflow.md#clean-up-resources).
63-
::: zone-end
64-
65-
::: zone pivot="platform-azportal,programming-language-java,programming-language-python,programming-language-javascript,programming-language-csharp,platform-azcli"
64+
To clean up your logic app workflow and related resources, see [Create an example Consumption logic app workflow using the Azure portal > Clean up resources](../../../logic-apps/quickstart-create-example-consumption-workflow.md#clean-up-resources).
6665

6766
## Next steps
6867

69-
In this quickstart, you learned how to:
68+
This article described how to create a user and delete a user. It also describes how to issue an access token to a user and remove a user access token using the Azure Communication Services Identity connector. For more information, see [Azure Communication Services Identity Connector](/connectors/acsidentity/).
7069

71-
> [!div class="checklist"]
72-
> * Issue access tokens
73-
> * Manage identities
70+
To see how tokens are use by other connectors, check out [how to send a chat message](../chat/logic-app.md) from Power Automate using Azure Communication Services.
7471

75-
> [!div class="nextstepaction"]
76-
> [Add voice calling to your app](../voice-video-calling/getting-started-with-calling.md)
72+
To learn more about how to send an email using the Azure Communication Services Email connector check [Send email message in Power Automate with Azure Communication Services](../email/logic-app.md).
7773

78-
You might also want to:
74+
## Related articles
7975

8076
- [Learn about authentication](../../concepts/authentication.md)
8177
- [Add chat to your app](../chat/get-started.md)
8278
- [Learn about client and server architecture](../../concepts/client-and-server-architecture.md)
8379
- [Deploy trusted authentication service hero sample](../../samples/trusted-auth-sample.md)
84-
85-
::: zone-end
86-
87-
::: zone pivot="platform-nocode"
88-
## Next steps
89-
90-
In this quickstart, you learned how to create a user, delete a user, issue a user an access token and remove user access token using the Azure Communication Services Identity connector. To learn more check the [Azure Communication Services Identity Connector](/connectors/acsidentity/) documentation.
91-
92-
To see how tokens are use by other connectors, check out [how to send a chat message](../chat/logic-app.md) from Power Automate using Azure Communication Services.
93-
94-
To learn more about how to send an email using the Azure Communication Services Email connector check [Send email message in Power Automate with Azure Communication Services](../email/logic-app.md).
95-
::: zone-end

articles/communication-services/quickstarts/identity/includes/access-tokens/access-token-az-cli.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,24 @@ ms.author: dademath
1818
- An active Communication Services resource and connection string. [Create a Communication Services resource](../../../create-communication-resource.md?#access-your-connection-strings-and-service-endpoints-using-azure-cli).
1919
- Install [Azure CLI](/cli/azure/install-azure-cli-windows?tabs=azure-cli).
2020

21-
## Setting up
21+
## Set up your environment
2222

2323
### Add the extension
24-
Add the Azure Communication Services extension for Azure CLI by using the `az extension` command.
24+
25+
Add the Azure Communication Services extension for Azure CLI using the `az extension` command.
2526

2627
```azurecli-interactive
2728
az extension add --name communication
2829
```
2930

3031
### Sign in to Azure CLI
31-
You'll need to [sign in to Azure CLI](/cli/azure/authenticate-azure-cli). You can sign in running the ```az login``` command from the terminal and providing your credentials.
32+
33+
You need to [sign in to Azure CLI](/cli/azure/authenticate-azure-cli). You can sign in running the ```az login``` command from the terminal, then provide your credentials.
3234

3335

3436
### (Optional) Use Azure CLI identity operations without passing in a connection string
3537

36-
You can configure the `AZURE_COMMUNICATION_CONNECTION_STRING` environment variable to use Azure CLI identity operations without having to use `--connection_string` to pass in the connection string. To configure an environment variable, open a console window and select your operating system from the below tabs. Replace `<yourConnectionString>` with your actual connection string.
38+
You can configure the `AZURE_COMMUNICATION_CONNECTION_STRING` environment variable to use Azure CLI identity operations without having to use `--connection_string` to pass in the connection string. To configure an environment variable, open a console window and select your operating system from the following tabs. Replace `<yourConnectionString>` with your actual connection string.
3739

3840
#### [Windows](#tab/windows)
3941

@@ -43,7 +45,7 @@ Open a console window and enter the following command:
4345
setx AZURE_COMMUNICATION_CONNECTION_STRING "<yourConnectionString>"
4446
```
4547

46-
After you add the environment variable, you may need to restart any running programs that will need to read the environment variable, including the console window. For example, if you're using Visual Studio as your editor, restart Visual Studio before running the example.
48+
After you add the environment variable, you might need to restart any running programs that need to read the environment variable, including the console window. For example, if you're using Visual Studio as your editor, restart Visual Studio before running the example.
4749

4850
#### [macOS](#tab/unix)
4951

@@ -53,7 +55,7 @@ Edit your **`.zshrc`**, and add the environment variable:
5355
export AZURE_COMMUNICATION_CONNECTION_STRING="<yourConnectionString>"
5456
```
5557

56-
After you add the environment variable, run `source ~/.zshrc` from your console window to make the changes effective. If you created the environment variable with your IDE open, you may need to close and reopen the editor, IDE, or shell in order to access the variable.
58+
After you add the environment variable, run `source ~/.zshrc` from your console window to make the changes effective. If you created the environment variable with your IDE open, you might need to close and reopen the editor, IDE, or shell in order to access the variable.
5759

5860
#### [Linux](#tab/linux)
5961

@@ -63,7 +65,7 @@ Edit your **`.bash_profile`**, and add the environment variable:
6365
export AZURE_COMMUNICATION_CONNECTION_STRING="<yourConnectionString>"
6466
```
6567

66-
After you add the environment variable, run `source ~/.bash_profile` from your console window to make the changes effective. If you created the environment variable with your IDE open, you may need to close and reopen the editor, IDE, or shell in order to access the variable.
68+
After you add the environment variable, run `source ~/.bash_profile` from your console window to make the changes effective. If you created the environment variable with your IDE open, you might need to close and reopen the editor, IDE, or shell in order to access the variable.
6769

6870
---
6971

@@ -79,7 +81,7 @@ Open a console window and enter the following command:
7981
setx AZURE_COMMUNICATION_ACCESS_TOKEN "<yourAccessToken>"
8082
```
8183

82-
After you add the environment variable, you may need to restart any running programs that will need to read the environment variable, including the console window. For example, if you're using Visual Studio as your editor, restart Visual Studio before running the example.
84+
After you add the environment variable, you might need to restart any running programs that need to read the environment variable, including the console window. For example, if you're using Visual Studio as your editor, restart Visual Studio before running the example.
8385

8486
#### [macOS](#tab/unix)
8587

@@ -89,7 +91,7 @@ Edit your **`.zshrc`**, and add the environment variable:
8991
export AZURE_COMMUNICATION_ACCESS_TOKEN="<yourAccessToken>"
9092
```
9193

92-
After you add the environment variable, run `source ~/.zshrc` from your console window to make the changes effective. If you created the environment variable with your IDE open, you may need to close and reopen the editor, IDE, or shell in order to access the variable.
94+
After you add the environment variable, run `source ~/.zshrc` from your console window to make the changes effective. If you created the environment variable with your IDE open, you might need to close and reopen the editor, IDE, or shell in order to access the variable.
9395

9496
#### [Linux](#tab/linux)
9597

@@ -99,7 +101,7 @@ Edit your **`.bash_profile`**, and add the environment variable:
99101
export AZURE_COMMUNICATION_ACCESS_TOKEN="<yourAccessToken>"
100102
```
101103

102-
After you add the environment variable, run `source ~/.bash_profile` from your console window to make the changes effective. If you created the environment variable with your IDE open, you may need to close and reopen the editor, IDE, or shell in order to access the variable.
104+
After you add the environment variable, run `source ~/.bash_profile` from your console window to make the changes effective. If you created the environment variable with your IDE open, you might need to close and reopen the editor, IDE, or shell in order to access the variable.
103105

104106
---
105107

@@ -159,7 +161,7 @@ Access tokens are short-lived credentials that need to be reissued. Not doing so
159161

160162
<a name='exchange-an-azure-ad-access-token-of-the-teams-user-for-a-communication-identity-access-token'></a>
161163

162-
### Exchange a Microsoft Entra access token of the Teams User for a Communication Identity access token
164+
### Exchange a Microsoft Entra access token of the Teams user for a Communication Identity access token
163165

164166
Use the `token get-for-teams-user` command to issue an access token for the Teams user that can be used with the Azure Communication Services SDKs.
165167

@@ -171,12 +173,12 @@ Make this replacement in the code:
171173

172174
- Replace `<yourConnectionString>` with your connection string.
173175
- Replace `<yourAadUser>` with your Microsoft Entra userId.
174-
- Replace `<yourAadApplication>` with your Microsoft Entra application Id.
176+
- Replace `<yourAadApplication>` with your Microsoft Entra application ID.
175177
- Replace `<yourAadToken>` with your Microsoft Entra access token.
176178

177179
### Revoke access tokens
178180

179-
You might occasionally need to explicitly revoke an access token. For example, you would do so when application users change the password they use to authenticate to your service. The `token revoke` command invalidates all active access tokens that were issued to the identity.
181+
You might need to explicitly revoke an access token. For example, you would do so when application users change the password they use to authenticate to your service. The `token revoke` command invalidates all active access tokens that were issued to the identity.
180182

181183
```azurecli-interactive
182184
az communication identity token revoke --user "<userId>" --connection-string "<yourConnectionString>"
@@ -189,7 +191,7 @@ Make this replacement in the code:
189191

190192
### Delete an identity
191193

192-
When you delete an identity, you revoke all active access tokens and prevent the further issuance of access tokens for the identity. Doing so also removes all persisted content that's associated with the identity.
194+
When you delete an identity, you revoke all active access tokens and prevent the further issuance of access tokens for the identity. Doing so also removes all persisted content associated with the identity.
193195

194196
```azurecli-interactive
195197
az communication identity user delete --user "<userId>" --connection-string "<yourConnectionString>"

articles/communication-services/quickstarts/identity/includes/access-tokens/access-token-az-portal.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@ ms.custom: mode-other
1515

1616
## Prerequisites
1717

18-
- An [Azure Communication Services resource](../../../create-communication-resource.md)
18+
- An [Azure Communication Services resource](../../../create-communication-resource.md).
1919

2020
## Create the access tokens
2121

22-
In the [Azure portal](https://portal.azure.com), navigate to the **Identities & User Access Tokens** blade within your Communication Services resource.
22+
1. In the [Azure portal](https://portal.azure.com), navigate to the **Identities & User Access Tokens** blade in your Communication Services resource.
2323

24-
Choose the scope of the access tokens. You can select none, one, or multiple. Click **Generate**.
24+
2. Choose the scope of the access tokens. You can choose none, one, or multiple services.
2525

26-
![Select the scopes of the identity and access tokens.](../../media/quick-create-identity-choose-scopes.png)
26+
3. Select **Generate**.
2727

28-
You'll see an identity and corresponding user access token generated. You can copy these strings and use them in the [sample apps](../../../../samples/overview.md) and other testing scenarios.
28+
:::image type="content" source="../../media/quick-create-identity-choose-scopes.png" alt-text="Screenshot that shows the scopes of the identity and access tokens where you select Generate." lightbox="../../media/quick-create-identity-choose-scopes.png":::
2929

30-
![The identity and access tokens are generated and show the expiration date.](../../media/quick-create-identity-generated.png)
30+
The system generates an identity and corresponding user access token.
31+
32+
4. Copy these strings and use them in the [sample apps](../../../../samples/overview.md) and other testing scenarios.
33+
34+
:::image type="content" source="../../media/quick-create-identity-generated.png" alt-text="Screenshot that shows the identity and access tokens with expiration date" lightbox="../../media/quick-create-identity-generated.png":::

0 commit comments

Comments
 (0)