question

MSTechie-7364 avatar image
0 Votes"
MSTechie-7364 asked AndriyBilous edited

Azure App Service to DB on Azure VM using Managed Identity ?

If my Azure Web App is connecting to the SQL 2019 database on SQL Azure VM, then can i use Managed identity authentication ? Yes or No

Any articles would be helpful

azure-webappsazure-ad-authentication
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.

1 Answer

AndriyBilous avatar image
0 Votes"
AndriyBilous answered AndriyBilous edited

Hello @MSTechie-7364

Short answer is no.
You cannot use managed identity for connection between Azure Web App and SQL 2019 database on SQL Azure VM
Here is a good illustration of usecases where you can use managed identity
79703-image.png

Here is full list of Azure services with support Azure AD authentication, these have been tested with client services that use managed identities for Azure resources.
https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities#azure-services-that-support-azure-ad-authentication

You can use any OpenID provider.
https://docs.microsoft.com/en-us/azure/app-service/overview-authentication-authorization#identity-providers


image.png (110.3 KiB)
· 2
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.

My SQLAzure VM is domain joined to my on-premises domain (over express route).

So can i connect from my Azure Web App to SQL on Azure VM , using Windows AD Authentication ? i think mostly no.

Can i atleast write some C# code to achieve windows authentication from Azure App Service to Azure SQL ?

0 Votes 0 ·

@MSTechie-7364 You can use any OpenID provider. More information on that here. You can also setup custom authentication, as described here.

@AndriyBilous Feel free to add on and additional content as well.


0 Votes 0 ·