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
Copy file name to clipboardExpand all lines: articles/storage/common/migrate-azure-credentials.md
+16-18Lines changed: 16 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,19 +82,17 @@ After making these code changes, run your application locally. The new configura
82
82
83
83
Once your application is configured to use passwordless connections and runs locally, the same code can authenticate to Azure services after it's deployed to Azure. The sections that follow explain how to configure a deployed application to connect to Azure Blob Storage using a managed identity.
After the resource is created, select **Go to resource** to view the details of the managed identity.
90
-
91
89
#### Associate the managed identity with your web app
92
90
93
91
You need to configure your web app to use the managed identity you created. Assign the identity to your app using either the Azure portal or the Azure CLI.
94
92
95
93
# [Azure Portal](#tab/azure-portal-associate)
96
94
97
-
Complete the following steps to use the Azure portal to associate an identity with your app. These steps apply to the following Azure services:
95
+
Complete the following steps in the Azure portal to associate an identity with your app. These same steps apply to the following Azure services:
98
96
99
97
* Azure Spring Apps
100
98
* Azure Container Apps
@@ -103,7 +101,7 @@ Complete the following steps to use the Azure portal to associate an identity wi
103
101
104
102
1. Navigate to the overview page of your web app.
105
103
1. Select **Identity** from the left navigation.
106
-
1. On the Identity page, switch to the **User assigned** tab.
104
+
1. On the **Identity** page, switch to the **User assigned** tab.
107
105
1. Select **+ Add** to open the **Add user assigned managed identity** flyout.
108
106
1. Select the subscription you used previously to create the identity.
109
107
1. Search for the **MigrationIdentity** by name and select it from the search results.
@@ -175,23 +173,23 @@ If you connected your services using the Service Connector you don't need to com
175
173
176
174
#### Update the application code
177
175
178
-
You need to configure your application code to look for the specific managed identity you created when it is deployed to Azure. Explicitly setting the managed identity for the app also prevents other environment identities from accidentally being detected and used automatically.
176
+
You need to configure your application code to look for the specific managed identity you created when it is deployed to Azure. In some scenarios, explicitly setting the managed identity for the app also prevents other environment identities from accidentally being detected and used automatically.
179
177
180
178
1. On the managed identity overview page, copy the client ID value to your clipboard.
181
179
1. Update the `DefaultAzureCredential` object in the `Program.cs` file of your app to specify this managed identity client ID.
182
180
183
-
```csharp
184
-
// TODO: Update the <your-storage-account-name> and <your-managed-identity-client-id> placeholders
Copy file name to clipboardExpand all lines: includes/passwordless/migration-guide/associate-managed-identity-cli.md
+2-27Lines changed: 2 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
Use the following Azure CLI commands to associate an identity with your app:
2
2
3
-
# [Azure App Service](#tab/app-service-identity)
4
-
5
3
Retrieve the ID of the managed identity you created using the [az identity show](/cli/azure/identity) command. Copy the output value to use in the next step.
6
4
7
5
```azurecli
8
6
az identity show --name MigrationIdentity -g <your-identity-resource-group-name> --query id
9
7
```
10
8
9
+
# [Azure App Service](#tab/app-service-identity)
10
+
11
11
You can assign a managed identity to an Azure App Service instance with the [az webapp identity assign](/cli/azure/webapp/identity) command.
12
12
13
13
```azurecli
@@ -19,12 +19,6 @@ az webapp identity assign \
19
19
20
20
# [Azure Spring Apps](#tab/spring-apps-identity)
21
21
22
-
Retrieve the ID of the managed identity you created using the [az identity show](/cli/azure/identity) command. Copy the output value to use in the next step.
23
-
24
-
```azurecli
25
-
az identity show --name MigrationIdentity -g <your-identity-resource-group-name> --query id
26
-
```
27
-
28
22
You can assign a managed identity to an Azure Spring Apps instance with the [az spring app identity assign](/cli/azure/spring/app/identity) command.
29
23
30
24
```azurecli
@@ -37,13 +31,6 @@ az spring app identity assign \
Retrieve the ID of the managed identity you created using the [az identity show](/cli/azure/identity) command. Copy the output value to use in the next step.
41
-
42
-
```azurecli
43
-
az identity show --name MigrationIdentity -g <your-identity-resource-group-name> --query id
44
-
```
45
-
You can assign a managed identity to an Azure Container Apps instance with the [az container app identity assign](/cli/azure/containerapp/identity) command.
46
-
47
34
```azurecli
48
35
az containerapp identity assign \
49
36
--resource-group <resource-group-name> \
@@ -53,12 +40,6 @@ az containerapp identity assign \
Retrieve the ID of the managed identity you created using the [az identity show](/cli/azure/identity) command. Copy the output value to use in the next step.
57
-
58
-
```azurecli
59
-
az identity show --name MigrationIdentity -g <your-identity-resource-group-name> --query id
60
-
```
61
-
62
43
You can assign a managed identity to a virtual machine with the [az vm identity assign](/cli/azure/vm/identity) command.
63
44
64
45
```azurecli
@@ -70,12 +51,6 @@ az vm identity assign \
70
51
71
52
# [Azure Kubernetes Service](#tab/aks-identity)
72
53
73
-
Retrieve the ID of the managed identity you created using the [az identity show](/cli/azure/identity) command. Copy the output value to use in the next step.
74
-
75
-
```azurecli
76
-
az identity show --name MigrationIdentity -g <your-identity-resource-group-name> --query id
77
-
```
78
-
79
54
You can assign a managed identity to an Azure Kubernetes Service (AKS) instance with the [az aks update](/cli/azure/aks) command.
Copy file name to clipboardExpand all lines: includes/passwordless/migration-guide/create-user-assigned-managed-identity.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
You can create a user-assigned managed identity using the Azure portal or the Azure CLI. Your application uses the identity to authenticate to other services.
1
+
You can create a user-assigned managed identity using the Azure portal or the Azure CLI. Your application uses the identity to authenticate to other services.
2
2
3
3
# [Azure portal](#tab/azure-portal-create)
4
4
@@ -9,14 +9,16 @@ You can create a user-assigned managed identity using the Azure portal or the Az
9
9
***Resource Group**: Select your desired resource group.
10
10
***Region**: Select a region near your location.
11
11
***Name**: Enter a recognizable name for your identity, such as *MigrationIdentity*.
12
-
1. Select **Review & Create** at the bottom of the page.
12
+
1. Select **Review + create** at the bottom of the page.
13
13
1. When the validation checks finish, select **Create**. Azure creates a new user-assigned identity.
14
14
15
-
:::image type="content" source="../../../articles/storage/common/media/create-managed-identity-portal-small.png" alt-text="A screenshot showing how to create a user assigned managed identity." lightbox="../../../articles/storage/common/media/create-managed-identity-portal.png" :::
15
+
After the resource is created, select **Go to resource** to view the details of the managedidentity.
16
16
17
+
:::image type="content" source="../../../articles/storage/common/media/create-managed-identity-portal-small.png" alt-text="A screenshot showing how to create a user assigned managed identity." lightbox="../../../articles/storage/common/media/create-managed-identity-portal.png" :::
18
+
17
19
# [Azure CLI](#tab/azure-cli-create)
18
20
19
-
Use the `az identity create` command to create a managed identity:
21
+
Use the `az identity create` command to create a user-assigned managed identity:
20
22
21
23
```azurecli
22
24
az identity create --name MigrationIdentity --resource-group <your-resource-group>
You can use Service Connector to create a connection between an Azure compute hosting environment and a target service using the Azure CLI. The service connector CLI commands automatically assign the proper role to your identity, as explained in the [portal instructions](#create-the-managed-identity-using-the-azure-portal).
1
+
You can use Service Connector to create a connection between an Azure compute hosting environment and a target service using the Azure CLI. The service connector CLI commands automatically assign the proper role to your identity.
2
2
3
3
1. Retrieve the client-id of the managed identity you created using the `az identity show` command. Copy the value for later use.
4
4
@@ -8,45 +8,45 @@ You can use Service Connector to create a connection between an Azure compute ho
8
8
9
9
1. Use the appropriate CLI command to establish the service connection:
10
10
11
-
# [Azure App Service](#tab/app-service-connector)
12
-
13
-
If you're using an Azure App Service, use the `az webapp connection` command:
0 commit comments