question

MarcusSearing-3467 avatar image
0 Votes"
MarcusSearing-3467 asked OuryBa-MSFT commented

AD Login Delegate to Azure SQL DB in Razor Web App

Background: I built a Razor Pages web app that connects to Azure SQL DB and have successfully set up Azure AD single sign on. I have a DB context class which use AD interactive authentication, but when I publish the app to the Web App Service, I have to configure the Azure SQL DB dependency and I am forced to hard-code a username and password.

I have created users and logins in the DB and also utilize RLS as not all users have a need to see all data in certain tables, so I want to retain the security measures already in place.

Problem: Because the username and password are hard-coded all users will be able to see, edit, delete information they shouldn't, so I need to configure pass-through authentication to the DB.

Anyone have examples on how to achieve this?

Just how you can configure Power BI to have end users use their own credentials to access the SQL DB, I need to this with my web app.

104942-screenshot-2021-06-10-141654.png



azure-active-directoryazure-sql-database
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OuryBa-MSFT avatar image
0 Votes"
OuryBa-MSFT answered OuryBa-MSFT commented

Hi @MarcusSearing-3467 Azure Active Directory (Azure AD) Pass-through Authentication will allow your users to sign in to both on-premises and cloud-based applications by using the same passwords and each password is a domain password for individual users, so each user has a different password. This article explains this in more details. Let us know if that helps.
Regards,
Oury


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MarcusSearing-3467 Please let us know if you have further query. Please don't forget to accept as answer if the reply is helpful.
Regards,
Oury

0 Votes 0 ·
PraveenBabuVejandla-6711 avatar image
0 Votes"
PraveenBabuVejandla-6711 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.