Skip to content

Commit 0f9357e

Browse files
authored
Merge pull request #242945 from cephalin/health-17-20
Health 17 20
2 parents ffdc974 + 8887185 commit 0f9357e

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed
-458 Bytes
Loading
31.9 KB
Loading

articles/app-service/overview-managed-identity.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Managed identities
33
description: Learn how managed identities work in Azure App Service and Azure Functions, how to configure a managed identity and generate a token for a back-end resource.
44

55
ms.topic: article
6-
ms.date: 01/27/2022
6+
ms.date: 06/27/2023
77
ms.reviewer: yevbronsh,mahender
88
ms.custom: devx-track-csharp, devx-track-azurepowershell, devx-track-azurecli
99
---
@@ -13,14 +13,14 @@ ms.custom: devx-track-csharp, devx-track-azurepowershell, devx-track-azurecli
1313
This article shows you how to create a managed identity for App Service and Azure Functions applications and how to use it to access other resources.
1414

1515
> [!IMPORTANT]
16-
> Managed identities for App Service and Azure Functions won't behave as expected if your app is migrated across subscriptions/tenants. The app needs to obtain a new identity, which is done by [disabling](#remove) and re-enabling the feature. Downstream resources also need to have access policies updated to use the new identity.
16+
> Because [managed identities don't support cross-directory scenarios](../active-directory/managed-identities-azure-resources/managed-identities-faq.md#can-i-use-a-managed-identity-to-access-a-resource-in-a-different-directorytenant), they won't behave as expected if your app is migrated across subscriptions or tenants. To recreate the managed identities after such a move, see [Will managed identities be recreated automatically if I move a subscription to another directory?](../active-directory/managed-identities-azure-resources/managed-identities-faq.md#will-managed-identities-be-recreated-automatically-if-i-move-a-subscription-to-another-directory). Downstream resources also need to have access policies updated to use the new identity.
1717
1818
> [!NOTE]
1919
> Managed identities are not available for [apps deployed in Azure Arc](overview-arc-integration.md).
2020
2121
[!INCLUDE [app-service-managed-identities](../../includes/app-service-managed-identities.md)]
2222

23-
The managed identity configuration is specific to the slot. To configure a managed identity for a deployment slot in the portal, navigate to the slot first. To find the managed identity for your web app or deployment slot in your Azure Active Directory tenant from the Azure portal, search for it directly from the **Overview** page of your tenant. Usually, the slot name is similar to `<app name>/slots/<slot name>`.
23+
The managed identity configuration is specific to the slot. To configure a managed identity for a deployment slot in the portal, navigate to the slot first. To find the managed identity for your web app or deployment slot in your Azure Active Directory tenant from the Azure portal, search for it directly from the **Overview** page of your tenant. Usually, the slot name is similar to `<app-name>/slots/<slot-name>`.
2424

2525
## Add a system-assigned identity
2626

@@ -78,7 +78,7 @@ For example, a web app's template might look like the following JSON:
7878

7979
```json
8080
{
81-
"apiVersion": "2016-08-01",
81+
"apiVersion": "2022-03-01",
8282
"type": "Microsoft.Web/sites",
8383
"name": "[variables('appName')]",
8484
"location": "[resourceGroup().location]",
@@ -103,8 +103,8 @@ When the site is created, it has the following additional properties:
103103
```json
104104
"identity": {
105105
"type": "SystemAssigned",
106-
"tenantId": "<TENANTID>",
107-
"principalId": "<PRINCIPALID>"
106+
"tenantId": "<tenant-id>",
107+
"principalId": "<principal-id>"
108108
}
109109
```
110110

@@ -135,14 +135,13 @@ First, you'll need to create a user-assigned identity resource.
135135

136136
1. Select **Identity**.
137137

138-
1. Within the **User assigned** tab, click **Add**.
138+
1. Select **User assigned** > **Add**.
139139

140-
1. Search for the identity you created earlier and select it. Click **Add**.
140+
1. Search for the identity you created earlier, select it, and select **Add**.
141141

142142
![Managed identity in App Service](media/app-service-managed-service-identity/user-assigned-managed-identity-in-azure-portal.png)
143143

144-
> [!IMPORTANT]
145-
> If you select **Add** after you select a user-assigned identity to add, your application will restart.
144+
Once you select **Add**, the app restarts.
146145

147146
# [Azure CLI](#tab/cli)
148147

@@ -183,13 +182,13 @@ Adding a user-assigned identity in App Service is currently not supported.
183182
184183
An Azure Resource Manager template can be used to automate deployment of your Azure resources. To learn more about deploying to App Service and Functions, see [Automating resource deployment in App Service](../app-service/deploy-complex-application-predictably.md) and [Automating resource deployment in Azure Functions](../azure-functions/functions-infrastructure-as-code.md).
185184
186-
Any resource of type `Microsoft.Web/sites` can be created with an identity by including the following block in the resource definition, replacing `<RESOURCEID>` with the resource ID of the desired identity:
185+
Any resource of type `Microsoft.Web/sites` can be created with an identity by including the following block in the resource definition, replacing `<resource-id>` with the resource ID of the desired identity:
187186
188187
```json
189188
"identity": {
190189
"type": "UserAssigned",
191190
"userAssignedIdentities": {
192-
"<RESOURCEID>": {}
191+
"<resource-id>": {}
193192
}
194193
}
195194
```
@@ -203,7 +202,7 @@ For example, a web app's template might look like the following JSON:
203202

204203
```json
205204
{
206-
"apiVersion": "2016-08-01",
205+
"apiVersion": "2022-03-01",
207206
"type": "Microsoft.Web/sites",
208207
"name": "[variables('appName')]",
209208
"location": "[resourceGroup().location]",
@@ -233,9 +232,9 @@ When the site is created, it has the following additional properties:
233232
"identity": {
234233
"type": "UserAssigned",
235234
"userAssignedIdentities": {
236-
"<RESOURCEID>": {
237-
"principalId": "<PRINCIPALID>",
238-
"clientId": "<CLIENTID>"
235+
"<resource-id>": {
236+
"principalId": "<principal-id>",
237+
"clientId": "<client-id>"
239238
}
240239
}
241240
}
@@ -365,7 +364,7 @@ When you remove a system-assigned identity, it's deleted from Azure Active Direc
365364
1. Select **Identity**. Then follow the steps based on the identity type:
366365

367366
- **System-assigned identity**: Within the **System assigned** tab, switch **Status** to **Off**. Click **Save**.
368-
- **User-assigned identity**: Click the **User assigned** tab, select the checkbox for the identity, and click **Remove**. Click **Yes** to confirm.
367+
- **User-assigned identity**: Select the **User assigned** tab, select the checkbox for the identity, and select **Remove**. Select **Yes** to confirm.
369368

370369
# [Azure CLI](#tab/cli)
371370

0 commit comments

Comments
 (0)