AADSTS500208: The domain is not a valid login domain for the account type.

Daniel Krzyczkowski 476 Reputation points MVP
2023-08-28T06:07:08.1833333+00:00

Hi,

I have MS Entra External ID preview tenant created. However, I noticed that I cannot authenticate successfully with the local account. Below I provide more details. I would be grateful for help/hints.

Describe the bug
When I try to login with corporate account or standard customer account (for instance using email from minutemailbox) I have below error displayed after authentication is completed:

There was an error trying to log you in: 'AADSTS500208: The domain is not a valid login domain for the account type.

To Reproduce
Steps to reproduce the behavior:

  1. Open sign in page.
  2. Create new account using using standard email like the one from minutemailbox service. Any account can be used, error is the same.
  3. Try to authenticate with new account.
  4. See error

Expected behavior
User should be authenticated successfully and tokens should be issued to the application.

My test tenant ID: 17444b8d-b055-4b48-8797-2c12f5b9b416

Few weeks ago I was able to successfully authenticate.

Thank you.

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,859 questions
{count} votes

13 answers

Sort by: Most helpful
  1. Daniel Krzyczkowski 476 Reputation points MVP
    2024-02-09T06:51:40.95+00:00

    Hi everyone, I would like to provide update on this thread as I was working together with Microsoft team and MVP Rory Braybrook to find the root cause of this issue.

    First of all, here is the answer I got from the person from Microsoft:

    Looking deeper this is a pretty generic error code - there are many ways you might end up miscoding the login domain such that you end up here. We have two fixes we'll be working on this quarter to help avoid this - fixing the issue Rory brought up where you get shown Entra ID configured samples in the App Registration pages and also updating the endpoints shown in the App Registration page which still point to login.onmicrosoft.com.

    One more important thing is that samples were wrongly configured. You can read Rory's post here:
    https://medium.com/the-new-control-plane/using-entra-external-id-ciam-with-the-msal-samples-86e6de6a8f20

    One of the important things is the correct format for the authorize endpoint: https://<TENANT_ID>.ciamlogin.com/<TENANT_ID>/oauth2/v2.0/authorize

    If you configure the sample with all above recommendations and you still face the issue it means that probably one of the issues mentioned by the person from Microsoft is happening in your preview tenant. The team is working to fix all potential issues this quarter.

    I hope this will help you.

    3 people found this answer helpful.

  2. Kentaro Inomata 26 Reputation points
    2023-12-02T14:10:10.55+00:00

    Maybe you should set "https://<tenant-subdomain>.ciamlogin.com/<tenant-id>/v2.0" for Issuer URL.
    OpenID Configuration endpoint is "https://<tenant-subdomain>.ciamlogin.com/<tenant-id>/v2.0/.well-known/openid-configuration"

    see: https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad?tabs=customer-tenant

    1 person found this answer helpful.
    0 comments No comments

  3. Martin Dreßler 30 Reputation points
    2023-12-06T16:26:50.13+00:00

    When using "https://<tenant-subdomain>.ciamlogin.com/<tenant-id>/v2.0/.well-known/openid-configuration" the login works, but the returned openid-configuration is not OpenIdConnect compliant and fails validation.

    Sadly https://<tenant-subdomain>.ciamlogin.com/<tenant-id>/v2.0/.well-known/openid-configuration returns a configuration containing "issuer":"https://login.microsoftonline.com/<tenant-id>/v2.0"

    The OIDC spec for the discovery endpoint https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidationstates clearly:

    The issuer value returned MUST be identical to the Issuer URL that was directly used to retrieve the configuration information. This MUST also be identical to the iss Claim value in ID Tokens issued from this Issuer.

    Is there any fix on the way for this?

    1 person found this answer helpful.

  4. Fabio Andrade 1,585 Reputation points Microsoft Employee
    2023-08-29T21:35:52.85+00:00

    Hi @Daniel Krzyczkowski

    Assuming that you have an application registered on Tenant 17444b8d-b055-4b48-8797-2c12f5b9b416, you'd need to sign in using a user account that exists on the same Tenant or invite an external user as a Guest.

    If you create a new account on your Azure AD tenant (test@yourdomain.onmicrosoft.com) would you get the same error?

    Thanks.


  5. Shweta Mathur 29,746 Reputation points Microsoft Employee
    2023-09-01T11:32:25.4366667+00:00

    Hi @Daniel Krzyczkowski ,

    Thanks for reaching out.

    I tried to sign up and sign into External Id preview using minuteinbox account as well from other personal accounts and able to create the account successfully without any error.

    User's image

    User's image

    I can understand that Microsoft Entra External Id is in preview and there might be chances that intermittent issues are coming.

    Could you please confirm that are you still facing the issues?

    Also, could you please confirm which application you are running to run the user flow?

    Thanks,

    Shweta


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.