Microsoft Entra ID not working in SQL Server VSCode

Carlos Casellas Garza 5 Reputation points
2025-07-11T17:39:09.76+00:00

Whenever I try to use my Microsoft Entra ID on the SQL Server extension in VSCode, I click 'Sign in', which takes me to the authentication page in my browser where I sign in. I get the page that says I am signed in and can close the browser, but the account does not show up as signed in SQL Server. Why is this happening?

SQL Server Database Engine
{count} vote

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Dinesh Yadlapalli 0 Reputation points Microsoft External Staff Moderator
    2025-11-26T11:09:17.7666667+00:00

    Hi @Carlos Casellas Garza ,

    Thank you for reaching out to the Microsoft Q & A Forum.

    Please check below things to fix the issue.

    1. Ensure you’re on mssql extension >= v1.35.0 and VS Code >= 1.103.x.
    2. Enable verbose Azure auth logs.

    Set

    "mssql.tracingLevel": "Verbose"

    Then open MSSQL Azure Auth Logs or SqlToolsService to check for missing azureAccounts.

    1. Clear VS Code token cache

    In Command Palette:

    MS SQL: Remove Microsoft Entra Account

    MS SQL: Clear Microsoft Entra account token cache

    1. On Windows, delete old aad-iv, aad-key entries from Credential Manager to force a fresh sign-in.
    2. Using Entra Service Principal authentication is not supported in the mssql extension, only user MFA login works.
    3. Ensure .NET Runtime 6+ is installed and SQL Tools Service is functioning properly.

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh


Your answer

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