Signing in error : The user account **** does not exist in the **** directory.

Romit 0 Reputation points
2025-04-23T07:04:58.25+00:00

Hi Community,

I'm trying to set up third-party IdP sign-in for Office 365 apps using a federated domain. I've made the necessary changes using Microsoft APIs, and when I try to sign in via portal.office.com or portal.azure.com, I'm correctly redirected to my IdP login page.

My domain ends with @test.com, and I already have a user (******@test.com) created both in Azure AD and in my IdP.

However, after entering the correct credentials on the IdP page, I'm redirected back to Azure and receive the following error:

**The user account ****@test.com does not exist in the <tenantid> directory. To sign into this application, the account must be added to the directory.

I did verify the user exists and UPN name is same too but still it says user doesn't exist in the directory.

I'm not sure what I'm missing. Any ideas on what could be causing this issue?

Thanks in advance!

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
860 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Romit 0 Reputation points
    2025-04-23T10:09:56.4333333+00:00

    Hey all,
    I got the solution. It was fairly simple. The solution I referred to is
    https://learn.microsoft.com/en-us/answers/questions/2028708/how-to-resolve-aadsts51004-error

    0 comments No comments

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.