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
# Tutorial: Use a managed identity to connect to an Azure ASP.NET web app and Azure SQL back end
@@ -128,11 +128,13 @@ az ad group member list -g $groupid
128
128
129
129
### Grant permissions to the managed identity
130
130
131
-
Go to the Azure portal to grant the minimum permissions your app needs.
131
+
Grant the identity the minimum permissions your app needs.
132
132
133
133
The name of a system-assigned identity is always the same as the app name. The name of a system-assigned identity for a deployment slot is `<app-name>/slots/<slot-name>`. To grant permissions for a Microsoft Entra group, use the group's display name, such as `myAzureSQLDBAccessGroup`.
134
-
135
-
<!--SQLCMD IS NO LONGER SUPPORTED IN BASH CLOUD SHELL as of April 2025. Use Powershell or portal.
134
+
135
+
# [Azure CLI](#tab/azcli)
136
+
137
+
<!--SQLCMD IS NO LONGER SUPPORTED IN BASH CLOUD SHELL as of April 2025. Use Powershell or portal.-->
136
138
1. In your Bash terminal, sign in to SQL Database by using the following SQLCMD command, replacing `<server-name>` with your server name, `<db-name>` with your database name, and `<aad-user-name>` and `<aad-password>` with your Microsoft Entra user credentials.
137
139
138
140
```bash
@@ -151,8 +153,9 @@ The name of a system-assigned identity is always the same as the app name. The n
151
153
152
154
1. Enter `EXIT` to return to the Bash prompt.
153
155
154
-
Here are portal steps I made up. Not sure if they work since my app doesn't work (database is blank).-->
156
+
# [Azure portal](#tab/portal)
155
157
158
+
<!--These portal steps might or might not be correct.-->
156
159
1. On your web app's page in the Azure portal, select **Identity** from the left navigation menu.
157
160
158
161
1. On the **System assigned** tab, make sure **Status** is set to **On**.
@@ -172,6 +175,8 @@ Here are portal steps I made up. Not sure if they work since my app doesn't work
172
175
173
176
After adding each role, select **Save**.
174
177
178
+
-----
179
+
175
180
> [!NOTE]
176
181
> The backend managed identity services [maintain a token cache](overview-managed-identity.md#configure-target-resource) that updates the token for a target resource only when it expires. If you try to modify your SQL Database permissions after first getting a token with your app, you don't get a new token with updated permissions until the cached token expires.
0 commit comments