Reconnect Issues in SSMS to Azure SQL DB with Microsoft Entra MFA After Role Reactivation

Jermy Hoffman 0 Reputation points
2025-04-17T07:06:14.6233333+00:00

Connecting to Azure SQL DB with Microsoft Entra MFA from SSMS was successful previously. However, after the role assignment to the Privileged Identity Management Group expired and was re-activated, reconnection from the same SSMS instance fails to invoke the Azure login page.

The following error is encountered:

TITLE: Microsoft SQL Server Management Studio Error connecting to '

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. PratikLad 1,825 Reputation points Microsoft External Staff Moderator
    2025-06-06T16:34:47.73+00:00

    Hi Jermy Hoffman

    Microsoft Entra PIM assigns and removes roles within seconds. However, applications may cache the user's role membership and not reflect updates immediately. Signing out and signing back in may help.

    When connecting to Azure SQL Database via SQL Server Management Studio (SSMS), the tool uses a cached Microsoft Entra token that includes your role assignments. One important detail to understand is that these tokens do not automatically refresh when your role is changed such as after activating a role through Microsoft Entra Privileged Identity Management (PIM).

    The cached token will remain valid for its original duration, regardless of whether your PIM role is currently active. SSMS uses this token silently, and unless the application is restarted or the token cache is cleared, it won’t request a fresh login or token update.

    Because of this behavior, after PIM role activation, SSMS may continue using a stale token without the updated role claims. This results in the Microsoft Entra login page not appearing, and the connection attempt fails with a generic "Error 18456", which typically indicates insufficient permissions.

    To resolve this, you should clear the Entra token cache or restart SSMS, both of which will force the application to retrieve a new token with the correct role assignments. This explains why simply restarting SSMS fixes the issue, and highlights the importance of refreshing tokens after role activation.


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.