Hi @Paul
Thank you for posting this in Microsoft Q&A.
I understand that you are getting error "invalid request: AADSTS500208: The domain is not a valid login domain for the account type."
Why does assigning a role will make it work? Is this by design?
Yes, this error is expected if the user has no role assigned.
This error could be caused by a consumer user from an AAD B2C or an Entra External ID for Customers (CIAM) tenant attempts to log in to login.microsoftonline.com
without having any roles assigned.
Azure AD B2C consumer users are intended to login to b2clogin.com
URL
Entra External ID for Customers consumer users are intended to login to ciamlogin.com
URL
If it is a guest admin \ invitation scenario, where user is hitting login.microsoftonline.com endpoint to manage a B2C or CIAM tenant via Entra\Azure portals then ensure the user has a valid role assigned in resource tenant.
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.