You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- A deployed Communication Services resource and connection string. [Create a Communication Services resource](../create-communication-resource.md).
20
+
- A deployed Communication Services resource and connection string. [Create a Communication Services resource](../../create-communication-resource.md).
21
21
22
22
## Final Code
23
23
Find the finalized code for this quickstart on [GitHub](https://github.com/Azure-Samples/communication-services-java-quickstarts/tree/main/access-token-quickstart).
@@ -83,7 +83,7 @@ public class App
83
83
84
84
## Authenticate the client
85
85
86
-
Instantiate a `CommunicationIdentityClient` with your resource's access key and endpoint. Learn how to [manage your resource's connection string](../create-communication-resource.md#store-your-connection-string). In addition, you can initialize the client with any custom HTTP client that implements the `com.azure.core.http.HttpClient` interface.
86
+
Instantiate a `CommunicationIdentityClient` with your resource's access key and endpoint. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string). In addition, you can initialize the client with any custom HTTP client that implements the `com.azure.core.http.HttpClient` interface.
87
87
88
88
Add the following code to the `main` method inside `App.java`:
89
89
@@ -108,7 +108,7 @@ CommunicationIdentityClient communicationIdentityClient = new CommunicationIdent
108
108
.buildClient();
109
109
```
110
110
111
-
If you have an Azure Active Directory(AD) application set up, see [Use service principals](../identity/service-principal.md), you may also authenticate with AD.
111
+
If you have an Azure Active Directory(AD) application set up, see [Use service principals](../../identity/service-principal.md), you may also authenticate with AD.
@@ -131,7 +131,7 @@ The created identity is required later to issue access tokens. You should theref
131
131
132
132
## Issue access tokens
133
133
134
-
Use the `getToken` method to issue an access token for already existing Communication Services identity. The `scopes` parameter defines set of permissions and abilities that this token will be able to perform. See the [list of supported actions](../../concepts/authentication.md) for valid values. In this case we'll use our user variable created in the previous step to get a token.
134
+
Use the `getToken` method to issue an access token for already existing Communication Services identity. The `scopes` parameter defines set of permissions and abilities that this token will be able to perform. See the [list of supported actions](../../../concepts/authentication.md) for valid values. In this case we'll use our user variable created in the previous step to get a token.
135
135
136
136
```java
137
137
// Issue an access token with the "voip" scope for a user identity
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/includes/access-tokens/access-token-js.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ ms.author: tchladek
16
16
17
17
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18
18
-[Node.js](https://nodejs.org/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1 recommended).
19
-
- An active Communication Services resource and connection string. [Create a Communication Services resource](../create-communication-resource.md).
19
+
- An active Communication Services resource and connection string. [Create a Communication Services resource](../../create-communication-resource.md).
20
20
21
21
## Final Code
22
22
Find the finalized code for this quickstart on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/access-tokens-quickstart).
@@ -76,7 +76,7 @@ main().catch((error) => {
76
76
77
77
## Authenticate the client
78
78
79
-
Instantiate a `CommunicationIdentityClient` with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../create-communication-resource.md#store-your-connection-string).
79
+
Instantiate a `CommunicationIdentityClient` with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
80
80
81
81
Add the following code to the `main` method:
82
82
@@ -103,7 +103,7 @@ const tokenCredential = new AzureKeyCredential(accessKey);
If you have an Azure Active Directory(AD) Application setup, see [Use service principals](../identity/service-principal.md), you may also authenticate with AD.
106
+
If you have an Azure Active Directory(AD) Application setup, see [Use service principals](../../identity/service-principal.md), you may also authenticate with AD.
@@ -122,7 +122,7 @@ You should store received identities with a mapping to your application's users.
122
122
123
123
## Issue access tokens
124
124
125
-
Use the `getToken` method to issue an access token for an already existing Communication Services identity. The `scopes` parameter defines a list of permissions/roles, that this token can perform/use. See the [list of supported actions](../../concepts/authentication.md). A new instance of parameter `communicationUser` can be constructed based on string representation of an Azure Communication Service identity.
125
+
Use the `getToken` method to issue an access token for an already existing Communication Services identity. The `scopes` parameter defines a list of permissions/roles, that this token can perform/use. See the [list of supported actions](../../../concepts/authentication.md). A new instance of parameter `communicationUser` can be constructed based on string representation of an Azure Communication Service identity.
126
126
127
127
```javascript
128
128
// Issue an access token with the "voip" scope for an identity
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/includes/access-tokens/access-token-net.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.author: tchladek
17
17
18
18
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
19
19
- The latest version [.NET Core SDK](https://dotnet.microsoft.com/download/dotnet-core) for your operating system.
20
-
- An active Communication Services resource and connection string. [Create a Communication Services resource](../create-communication-resource.md).
20
+
- An active Communication Services resource and connection string. [Create a Communication Services resource](../../create-communication-resource.md).
21
21
22
22
## Final Code
23
23
Find the finalized code for this quickstart on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/AccessTokensQuickstart).
Now we'll, initialize a `CommunicationIdentityClient` with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../create-communication-resource.md#store-your-connection-string).
82
+
Now we'll, initialize a `CommunicationIdentityClient` with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
If you have an Azure Active Directory(AD) application set up, see [Use Service Principals](../identity/service-principal.md), you may also authenticate with AD.
102
+
If you have an Azure Active Directory(AD) application set up, see [Use Service Principals](../../identity/service-principal.md), you may also authenticate with AD.
@@ -118,7 +118,7 @@ You should store the received identity with a mapping to your application's user
118
118
119
119
## Issue identity access tokens
120
120
121
-
Once you have an identity, use the `GetToken` method to issue an access token for the identity. The `scopes` parameter defines set of permissions/abilities, that this access token can perform. See the [list of supported actions](../../concepts/authentication.md). A new instance of a `communicationUser` can also be constructed based on string representation of an Azure Communication Service identity.
121
+
Once you have an identity, use the `GetToken` method to issue an access token for the identity. The `scopes` parameter defines set of permissions/abilities, that this access token can perform. See the [list of supported actions](../../../concepts/authentication.md). A new instance of a `communicationUser` can also be constructed based on string representation of an Azure Communication Service identity.
122
122
123
123
```csharp
124
124
// Issue an access token with the "voip" scope for an identity
@@ -137,7 +137,7 @@ Access tokens are short-lived credentials that need to be reissued. Not doing so
137
137
138
138
## Create an identity and issue an access token within the same request
139
139
140
-
You can use the `CreateUserAndTokenAsync` method to create a Communication Services identity and issue an access token for it at the same time. The `scopes` parameter defines set of permissions/abilities, that this access token can perform. See the [list of supported actions](../../concepts/authentication.md).
140
+
You can use the `CreateUserAndTokenAsync` method to create a Communication Services identity and issue an access token for it at the same time. The `scopes` parameter defines set of permissions/abilities, that this access token can perform. See the [list of supported actions](../../../concepts/authentication.md).
141
141
142
142
```csharp
143
143
// Issue an identity and an access token with the "voip" scope for the new identity
Next we'll instantiate a `CommunicationIdentityClient` with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../create-communication-resource.md#store-your-connection-string).
59
+
Next we'll instantiate a `CommunicationIdentityClient` with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
Alternatively, if you have an Azure Active Directory(AD) application set up, see [Use service principals](../identity/service-principal.md), you may also authenticate with AD.
72
+
Alternatively, if you have an Azure Active Directory(AD) application set up, see [Use service principals](../../identity/service-principal.md), you may also authenticate with AD.
@@ -88,7 +88,7 @@ You should store the received identity with a mapping to your application's user
88
88
89
89
## Issue access tokens
90
90
91
-
Use the `get_token` method to issue an access token for already existing Communication Services identity. The `scopes` parameter defines set of permissions/abilities, that this access token can perform. See the [list of supported actions](../../concepts/authentication.md). a new instance of parameter `CommunicationUserIdentifier` can also be constructed based on string representation of Azure Communication Service identity.
91
+
Use the `get_token` method to issue an access token for already existing Communication Services identity. The `scopes` parameter defines set of permissions/abilities, that this access token can perform. See the [list of supported actions](../../../concepts/authentication.md). a new instance of parameter `CommunicationUserIdentifier` can also be constructed based on string representation of Azure Communication Service identity.
92
92
93
93
```python
94
94
# Issue an access token with the "voip" scope for an identity
@@ -104,7 +104,7 @@ Access tokens are short-lived credentials that need to be reissued. Not doing so
104
104
105
105
## Create an identity and issue an access token within the same request
106
106
107
-
You can use the `create_user_and_token` method to create a Communication Services identity and issue an access token for it. The `scopes` parameter defines set of permissions/abilities, that this access token can perform.. See the [list of supported actions](../../concepts/authentication.md).
107
+
You can use the `create_user_and_token` method to create a Communication Services identity and issue an access token for it. The `scopes` parameter defines set of permissions/abilities, that this access token can perform.. See the [list of supported actions](../../../concepts/authentication.md).
108
108
109
109
```python
110
110
# Issue an identity and an access token with the "voip" scope for the new identity
0 commit comments