Reputation: 499
I am trying to connect from SSMS to an Azure SQL DB with a service principal. I have added the service principal user to the database and granted db_datareader
permission.
Connecting with SSMS version 19.1.56.0 and Azure Active Directory - Service Principal
authentication works successfully, using the App Id as the username, and the client secret as the password.
When trying to connect using the same method in SSMS 19.2, the connection fails with Login failed for user '<token-identified principal>'.
The only difference I can see is the Authentication
method is changed from Azure Active Directory - Service Principal
to Microsoft Entra Service Principal
.
Why does this no longer work?
Upvotes: 0
Views: 552
Reputation: 8301
SSMS 19.2 Authentication Failure: Azure SQL DB AAD - Service Principal Auth vs Entra ID - Service Principal Auth
Faced the similar issue and the cause of issue is you have created user in the particular database but when you are trying to login directly its default logging in master database.
When connecting to database through SSMS go to Connection Properties >> specify the database name >> Connect.
Upvotes: -1