Login failed for user '<token-identified principal>'. The server is not currently configured to accept this token.

Nitish Chauhan 76 Reputation points
2023-06-15T03:54:32.7+00:00

I am repeatedly getting this issue when using Managed Service Identity to connect SQL from Visual Studio 2022 17.4.4.

It is intermittent, although once I'm stuck it is very hard to clear.

I have tried the following
-'az account clear' 'az login'
-Tools -> Options -> Azure Service Authentication -> Re-enter your credentials -> Use MFA
-Credential Manager and Remove all profiles
-Clear all browser cache and memory (on every browser including Edge)

Happens both multiple networks (work and home) and on or off VPN.

It just keeps asking me to Re-enter my credentails on Tools -> Options -> etc. in a loop.

Is there any way to fix this or understand where this is memory can be cleared? Or is this an issue with AAD.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,068 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. PercyTang-MSFT 12,426 Reputation points Microsoft Vendor
    2023-06-16T02:37:03.1533333+00:00

    Hi @Nitish Chauhan

    You can check if the workaround in this thread helps you.

    https://learn.microsoft.com/en-us/answers/questions/133709/login-failed-for-user

    Best regards,

    Percy Tang


    If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.