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/app-service/tutorial-connect-app-access-sql-database-as-user-dotnet.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,16 +156,16 @@ Update your application code to add the access token supplied by App Service aut
156
156
> [!NOTE]
157
157
> This code doesn't work locally. For more information and alternatives for local debugging, see [Debug locally when you use App Service authentication](#how-do-i-debug-locally-when-using-app-service-authentication).
158
158
159
-
In your `DbContext` object in *DatabaseContext.cs* or other file that configures the database context, change the default constructor to add the Microsoft Entra ID access token to the connection object.
1.In your `DbContext` object in *DatabaseContext.cs* or other file that configures the database context, change the default constructor to add the Microsoft Entra ID access token to the connection object.
1. If you have a connection string called `defaultConnection` in App Service that uses SQL authentication with a username and password, use the following command to remove the connection secrets. Replace `<group-name>`, `<app-name>`, `<db-server-name>`, and `<db-name>` with your values.
171
171
@@ -210,12 +210,12 @@ This command might take some time to run.
210
210
211
211
## Frequently asked questions
212
212
213
-
-[Why do I get a Login failed for user '\<token-identified principal>' error?](#why-do-i-get-a-login-failed-for-user-token-identified-principal-error)
213
+
-[Why do I get a "Login failed for user '\<token-identified principal>'" error?](#why-do-i-get-a-login-failed-for-user-token-identified-principal-error)
214
214
-[How do I add other Microsoft Entra users or groups in Azure SQL Database?](#how-do-i-add-other-azure-ad-users-or-groups-in-azure-sql-database)
215
215
-[How do I debug locally when using App Service authentication?](#how-do-i-debug-locally-when-using-app-service-authentication)
216
216
-[What happens when access tokens expire?](#what-happens-when-access-tokens-expire)
217
217
218
-
#### Why do I get a Login failed for user '\<token-identified principal>' error?
218
+
#### Why do I get a "Login failed for user '\<token-identified principal>'" error?
219
219
220
220
The most common causes for a `Login failed for user '<token-identified principal>'` error are:
0 commit comments