Joe Plumb
Joe Plumb

Reputation: 499

SSMS 19.2 Authentication Failure: Azure SQL DB AAD - Service Principal Auth vs Entra ID - Service Principal Auth

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.

screenshot of successful connection to the database using SP auth with SSMS v19.1

When trying to connect using the same method in SSMS 19.2, the connection fails with Login failed for user '<token-identified principal>'.

screenshot of failed connection in ssms 19.2

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

Answers (1)

Pratik Lad
Pratik Lad

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.

enter image description here

Upvotes: -1

Related Questions