Skip to content

Commit 928c84b

Browse files
authored
update
1 parent b58fdd8 commit 928c84b

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

articles/azure-signalr/signalr-howto-authorize-application.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Authorize requests to Azure SignalR Service resources with Microsoft Entra applications
33
description: This article provides information about authorizing requests to Azure SignalR Service resources by using Microsoft Entra applications.
4-
author: vicancy
5-
ms.author: lianwei
6-
ms.date: /2023
4+
author: terence fan
5+
ms.author: tefa
6+
ms.date: 03/14/2023
77
ms.service: azure-signalr-service
88
ms.topic: how-to
99
ms.devlang: csharp
@@ -22,7 +22,7 @@ The first step is to [Register an application in Microsoft Entra ID](/entra/iden
2222

2323
After you register your application, you can find the **Application (client) ID** and **Directory (tenant) ID** values on the application's overview page. These GUIDs can be useful in the following steps.
2424

25-
![Screenshot of overview information for a registered application.]dia/signalr-howto-authorize-application/application-overview.png)
25+
![Screenshot of overview information for a registered application.](./media/signalr-howto-authorize-application/application-overview.png)
2626

2727
## Add credentials
2828

@@ -35,18 +35,18 @@ After registering an app, you can add **certificates, client secrets (a string),
3535

3636
## Add role assignments in the Azure portal
3737

38-
The following steps describe how to assign a SignalR App Server role to a service principal (application) over an Azure SignalR Service resource. For detailed steps, see [Assign Azure roles using the Azure portal](le-based-access-control/role-assignments-portal.yml).
38+
The following steps describe how to assign a SignalR App Server role to a service principal (application) over an Azure SignalR Service resource. For detailed steps, see [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.yml).
3939

4040
> [!NOTE]
41-
> A role can be assigned to any scope, including management group, subscription, resource group, or single resource. To learn more about scope, see [Understand scope for Azure RBAC](le-based-access-control/scope-overview.md).
41+
> A role can be assigned to any scope, including management group, subscription, resource group, or single resource. To learn more about scope, see [Understand scope for Azure RBAC](../role-based-access-control/scope-overview.md).
4242
43-
1. In the [Azure portal](httportal.azure.com/), go to your Azure SignalR Service resource.
43+
1. In the [Azure portal](https://portal.azure.com/), go to your Azure SignalR Service resource.
4444

4545
1. Select **Access control (IAM)**.
4646

4747
1. Select **Add** > **Add role assignment**.
4848

49-
:::image type="content" source=usable-content/ce-skilling/azure/media/role-based-access-control/add-role-assignment-menu-generic.png" alt-text="Screenshot that shows the page for access control and selections for adding a role assignment.":::
49+
:::image type="content" source="~/reusable-content/ce-skilling/azure/media/role-based-access-control/add-role-assignment-menu-generic.png" alt-text="Screenshot that shows the page for access control and selections for adding a role assignment.":::
5050

5151
1. On the **Role** tab, select **SignalR App Server**.
5252

@@ -61,15 +61,15 @@ The following steps describe how to assign a SignalR App Server role to a servic
6161
6262
To learn more about how to assign and manage Azure roles, see these articles:
6363

64-
- [Assign Azure roles using the Azure portal](le-based-access-control/role-assignments-portal.yml)
65-
- [Assign Azure roles using the REST API](le-based-access-control/role-assignments-rest.md)
66-
- [Assign Azure roles using Azure PowerShell](le-based-access-control/role-assignments-powershell.md)
67-
- [Assign Azure roles using the Azure CLI](le-based-access-control/role-assignments-cli.md)
68-
- [Assign Azure roles using Azure Resource Manager templates](le-based-access-control/role-assignments-template.md)
64+
- [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.yml)
65+
- [Assign Azure roles using the REST API](../role-based-access-control/role-assignments-rest.md)
66+
- [Assign Azure roles using Azure PowerShell](../role-based-access-control/role-assignments-powershell.md)
67+
- [Assign Azure roles using the Azure CLI](../role-based-access-control/role-assignments-cli.md)
68+
- [Assign Azure roles using Azure Resource Manager templates](../role-based-access-control/role-assignments-template.md)
6969

7070
## Microsoft.Azure.SignalR app server SDK for C#
7171

72-
[Azure SignalR server SDK for C#](httpithub.com/Azure/azure-signalr)
72+
[Azure SignalR server SDK for C#](https://github.com/Azure/azure-signalr)
7373

7474
### Use Microsoft Entra application with certificate
7575
```csharp
@@ -78,7 +78,7 @@ services.AddSignalR().AddAzureSignalR(option =>
7878
var credential = new ClientCertificateCredential("tenantId", "clientId", "path-to-cert");
7979

8080
option.Endpoints = [
81-
new ServiceEndpoint(new Uri(), "httpresource>.service.signalr.net"), credential);
81+
new ServiceEndpoint(new Uri(), "https://<resource>.service.signalr.net"), credential);
8282
];
8383
});
8484
```
@@ -91,7 +91,7 @@ services.AddSignalR().AddAzureSignalR(option =>
9191
var credential = new ClientSecretCredential("tenantId", "clientId", "clientSecret");
9292

9393
option.Endpoints = [
94-
new ServiceEndpoint(new Uri(), "httpresource>.service.signalr.net"), credential);
94+
new ServiceEndpoint(new Uri(), "https://<resource>.service.signalr.net"), credential);
9595
];
9696
});
9797
```
@@ -109,15 +109,15 @@ services.AddSignalR().AddAzureSignalR(option =>
109109

110110
var credential = new ClientAssertionCredential("tenantId", "appClientId", async (ctoken) =>
111111
{
112-
Entra ID US Government: api://AzureADTokenExchangeUSGov
113-
Entra ID China operated by 21Vianet: api://AzureADTokenExchangeChina
114-
var request = new TokenRequestContext([$"apzureADTokenExchange/.default"]);
112+
// Entra ID US Government: api://AzureADTokenExchangeUSGov
113+
// Entra ID China operated by 21Vianet: api://AzureADTokenExchangeChina
114+
var request = new TokenRequestContext([$"api://AzureADTokenExchange/.default"]);
115115
var response = await msiCredential.GetTokenAsync(request, ctoken).ConfigureAwait(false);
116116
return response.Token;
117117
});
118118

119119
option.Endpoints = [
120-
new ServiceEndpoint(new Uri(), "httpresource>.service.signalr.net"), credential);
120+
new ServiceEndpoint(new Uri(), "https://<resource>.service.signalr.net"), credential);
121121
];
122122
});
123123
```
@@ -136,30 +136,30 @@ services.AddSignalR().AddAzureSignalR(option =>
136136

137137
option.Endpoints = new ServiceEndpoint[]
138138
{
139-
new ServiceEndpoint(new Uri("httpresource1>.service.signalr.net"), credential1),
140-
new ServiceEndpoint(new Uri("httpresource2>.service.signalr.net"), credential2),
139+
new ServiceEndpoint(new Uri("https://<resource1>.service.signalr.net"), credential1),
140+
new ServiceEndpoint(new Uri("https://<resource2>.service.signalr.net"), credential2),
141141
};
142142
});
143143
```
144144

145145
## Azure SignalR Service bindings in Azure Functions
146146

147-
Azure SignalR Service bindings in Azure Functions use [application settings](ure-functions/functions-how-to-use-azure-function-app-settings.md) in the portal or [local.settings.json](../azure-functions/functions-develop-local.md#local-settings-file) locally to configure Microsoft Entra application identities to access your Azure SignalR Service resources.
147+
Azure SignalR Service bindings in Azure Functions use [application settings](../azure-functions/functions-how-to-use-azure-function-app-settings.md) in the portal or [local.settings.json](../azure-functions/functions-develop-local.md#local-settings-file) locally to configure Microsoft Entra application identities to access your Azure SignalR Service resources.
148148

149-
First, you need to specify the service URI of Azure SignalR Service. The key of the service URI is `serviceUri`. It starts with a connection name prefix (which defaults to `AzureSignalRConnectionString`) and a separator. The separator is an underscore (`__`) in the Azure portal and a colon (`:`) in the *local.settings.json* file. You can customize the connection name by using the binding property [`ConnectionStringSetting`](ure-functions/functions-bindings-signalr-service.md). Continue reading to find the sample.
149+
First, you need to specify the service URI of Azure SignalR Service. The key of the service URI is `serviceUri`. It starts with a connection name prefix (which defaults to `AzureSignalRConnectionString`) and a separator. The separator is an underscore (`__`) in the Azure portal and a colon (`:`) in the *local.settings.json* file. You can customize the connection name by using the binding property [`ConnectionStringSetting`](../azure-functions/functions-bindings-signalr-service.md). Continue reading to find the sample.
150150

151151
Then, you choose whether to configure your Microsoft Entra application identity in [predefined environment variables](#configure-an-identity-in-predefined-environment-variables) or in [SignalR-specified variables](#configure-an-identity-in-signalr-specified-variables).
152152

153153
### Configure an identity in predefined environment variables
154154

155-
See [Environment variablestnet/api/overview/azure/identity-readme#environment-variables) for the list of predefined environment variables. When you have multiple services, we recommend that you use the same application identity, so that you don't need to configure the identity for each service. Other services might also use these environment variables, based on the settings of those services.
155+
See [Environment variables](/dotnet/api/overview/azure/identity-readme#environment-variables) for the list of predefined environment variables. When you have multiple services, we recommend that you use the same application identity, so that you don't need to configure the identity for each service. Other services might also use these environment variables, based on the settings of those services.
156156

157157
For example, to use client secret credentials, configure the identity as follows in the *local.settings.json* file:
158158

159159
```json
160160
{
161161
"Values": {
162-
"<CONNECTION_NAME_PREFIX>:serviceUri": "httpSIGNALR_RESOURCE_NAME>.service.signalr.net",
162+
"<CONNECTION_NAME_PREFIX>:serviceUri": "https://<SIGNALR_RESOURCE_NAME>.service.signalr.net",
163163
"AZURE_CLIENT_ID": "...",
164164
"AZURE_CLIENT_SECRET": "...",
165165
"AZURE_TENANT_ID": "..."
@@ -170,7 +170,7 @@ For example, to use client secret credentials, configure the identity as follows
170170
In the Azure portal, add settings as follows:
171171

172172
```bash
173-
<CONNECTION_NAME_PREFIX>__serviceUri=httpSIGNALR_RESOURCE_NAME>.service.signalr.net
173+
<CONNECTION_NAME_PREFIX>__serviceUri=https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
174174
AZURE_CLIENT_ID = ...
175175
AZURE_TENANT_ID = ...
176176
AZURE_CLIENT_SECRET = ...
@@ -189,7 +189,7 @@ Here are the samples to use client secret credentials in the *local.settings.jso
189189
```json
190190
{
191191
"Values": {
192-
"<CONNECTION_NAME_PREFIX>:serviceUri": "httpSIGNALR_RESOURCE_NAME>.service.signalr.net",
192+
"<CONNECTION_NAME_PREFIX>:serviceUri": "https://<SIGNALR_RESOURCE_NAME>.service.signalr.net",
193193
"<CONNECTION_NAME_PREFIX>:clientId": "...",
194194
"<CONNECTION_NAME_PREFIX>:clientSecret": "...",
195195
"<CONNECTION_NAME_PREFIX>:tenantId": "..."
@@ -200,7 +200,7 @@ Here are the samples to use client secret credentials in the *local.settings.jso
200200
In the Azure portal, add settings as follows:
201201

202202
```bash
203-
<CONNECTION_NAME_PREFIX>__serviceUri = httpSIGNALR_RESOURCE_NAME>.service.signalr.net
203+
<CONNECTION_NAME_PREFIX>__serviceUri = https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
204204
<CONNECTION_NAME_PREFIX>__clientId = ...
205205
<CONNECTION_NAME_PREFIX>__clientSecret = ...
206206
<CONNECTION_NAME_PREFIX>__tenantId = ...
@@ -212,4 +212,4 @@ See the following related articles:
212212

213213
- [Authorize access with Microsoft Entra ID for Azure SignalR Service](signalr-concept-authorize-azure-active-directory.md)
214214
- [Authorize requests to Azure SignalR Service resources with Microsoft Entra managed identities](signalr-howto-authorize-managed-identity.md)
215-
- [Disable local authentication]wto-disable-local-auth.md)
215+
- [Disable local authentication](./howto-disable-local-auth.md)

0 commit comments

Comments
 (0)