Login Failed for user '<token-identified principal>'. (Microsoft SQL Server, Error: 18456)

Megan Barnason 0 Reputation points

I was booted off the server this morning and then when I tried to log back in, I keep getting the below error. I have not made any changes to my log in credentials. When I use the MFA verification, I get the text with the code and enter it, then get this error. Other users are able to login. I have administrator access where as they do not. I have changed nothing.

TITLE: Connect to Server

Cannot connect to XXXXXX.database.windows.net.


Login failed for user '<token-identified principal>'. (Microsoft SQL Server, Error: 18456)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 27,546 Reputation points MVP

    A possible solution may be to drop the user on the database and recreate the user as a contained database user mapped to the Azure Active Directory identity as explained here. For example,

    CREATE USER [alice@fabrikam.onmicrosoft.com] FROM EXTERNAL PROVIDER;
    0 comments No comments

  2. Rahul Randive 1,811 Reputation points Microsoft Employee

    Hi @Megan Barnason

    Thanks for your question.

    Please follow below blog for Login failed for user '<token-identified principal>'. (Microsoft SQL Server, Error: 18456) related error


    Let us know if this help or if you need any additional information.

    Thank you!

    0 comments No comments