Error Code Portal
MicrosoftMicrosoft Entra IDError code

AADSTS51004

UserAccountNotInDirectory

Alternative forms: 51004

Code AADSTS51004 · An issue reported by Microsoft Entra ID.

UserAccountNotInDirectory - The user account doesn’t exist in the directory. An application likely chose the wrong tenant to sign into, and the currently logged in user was prevented from doing so since they did not exist in your tenant. If this user should be able to log in, add them as a guest. For further information, please visit add B2B users.

Troubleshooting and diagnostic links

First check that the document's product, version, and environment match your situation.