Azure AD 404 error when login with Microsoft account

Yongjin 1 Reputation point

I created a Cognito userpool and an Azure AD b2c application. I connected Azure AD b2c to Cognito as a OpenID Connect identity provider.

I am able to login successfully with an authorized user configured under my Azure AD. And if I log in with another Azure account from another directory, the page shows a proper message telling me my account does not belong to the Azure AD.

However, if I login with my Microsoft account, I get an 404 error message as below. This issue looks like an Azure issue. Can anyone help me troubleshooting this?


Instead, I was expecting a message like below


Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,774 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,617 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,506 Reputation points

    HI @Yongjin-4073

    This is not Azure error as the error is returned by and not by If you want to allow signup/signin with Microsoft Account, you would need to add Microsoft Accounts (MSA) IDP to Cognito. You can reference or check if there is any Cognito documentation available to add MSA as IDP.

    Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.