After enforcing MFA, users cant connect to SQL database through SSMS

Christian Christensen 1 Reputation point
2022-01-24T09:39:44.41+00:00

My users cant connect to the SQL database using SSMS after we have enabled their MFA. They are using version 18.10 of the SSMS app. This is the error the one user receives.

Cannot connect to t####################3.

===================================

Login failed for user '<token-identified principal>'. (.Net SqlClient Data Provider)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476


Server Name: t##########################3
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,630 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ronen Ariely 15,201 Reputation points
    2022-01-24T11:47:57.043+00:00

    Hi,

    First confirm that the users were added as an Azure SQL Administrator - you can do this in the portal

    navigate to the Azure SQL logical Server -> in the left menu select Azure Active Directory -> confirm your users are registered there or add them using Set admin

    167931-image.png

    Make sure that you are using the right authentication type when you try to connect the SQL Server

    167837-image.png

    1 person found this answer helpful.

  2. Jermy Hoffman 0 Reputation points
    2025-03-13T12:20:03.3566667+00:00

    I have similar issue.

    I'm connecting to SQL Server using Microsoft Entra MFA Authentication.

    When I first connect, a login page opened in my web browser and after login to Azure, I successfully connect to the SQL Server.

    After PIM assignment expires, and I re-activate it, and try to re-connect to SQL Server from SSMS, the login page doesn't open again, and I'm getting the same exact error as mentioned above.

    If I restart the SSMS and try again to connect, everything works perfectly.

    Any suggestion?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.