Skip to content

Commit 06a74de

Browse files
committed
replace sqlcmd
1 parent d76b9ef commit 06a74de

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

articles/app-service/tutorial-connect-msi-sql-database.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: cephalin
66

77
ms.devlang: csharp
88
ms.topic: tutorial
9-
ms.date: 05/27/2025
9+
ms.date: 06/02/2025
1010
ms.custom: devx-track-csharp, mvc, cli-validate, devx-track-azurecli, devx-track-dotnet, AppServiceConnectivity
1111
---
1212
# 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
128128

129129
### Grant permissions to the managed identity
130130

131-
Go to the Azure portal to grant the minimum permissions your app needs.
131+
Grant the identity the minimum permissions your app needs.
132132

133133
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.-->
136138
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.
137139

138140
```bash
@@ -151,8 +153,9 @@ The name of a system-assigned identity is always the same as the app name. The n
151153

152154
1. Enter `EXIT` to return to the Bash prompt.
153155

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)
155157

158+
<!--These portal steps might or might not be correct.-->
156159
1. On your web app's page in the Azure portal, select **Identity** from the left navigation menu.
157160

158161
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
172175

173176
After adding each role, select **Save**.
174177

178+
-----
179+
175180
> [!NOTE]
176181
> 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.
177182

0 commit comments

Comments
 (0)