An Azure relational database service.
Hi @PauloMarques-9662 ,
Thanks for reaching out.
I understand you are trying to connect Azure AD with Azure SQL DB and getting error "AAD Auth Error - Login failed for user '<token-identified principal>"
This is usually related to an AAD user which is not added on SQL DB that you are trying to connect or that the AAD user is not added in the AAD Server Admin.
You just need to add an AAD user in Azure SQL DB. Thus, you need to add the user in Azure SQL DB as the contained user. To create and add an Azure AD based contained user, connect to the database with an Azure AD identity, as a user with at least the ‘ALTER ANY USER’ permission. Then use the following Transact-SQL syntax: -
CREATE USER <Azure_AD_principal_name> FROM EXTERNAL PROVIDER;
Hope this will help.
Thanks,
Shweta
---------------------------------------
Please remember to "Accept Answer" if answer helped you.