Hi @James
Thank you for reaching Microsoft Q&A forum!
If I understand correctly, when you trying to login with the application using Microsoft SSO via the Oauth2 SDK you got the error AADSTS500200: User account 'xxxxxxxxx*@*xxxxxx.com' is a personal Microsoft account. Personal Microsoft accounts are not supported for this application unless explicitly invited to an organization. Try signing out and signing back in with an organizational account. this has happened when you tried in an incognito Chrome window.
It might be the issue with the wrong endpoint, if your app registration's supported account type set to Accounts in any organizational directory (Any Microsoft Entra directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
If you use https://login.microsoftonline.com/<YourTenantNameOrID>
the behavior is expected. because the authentication is expected to be run on your tenant only. This scenario causes the sign-in error if you expect users to sign in by using federation with another tenant or identity provider.
To fix this issue you need use the correct sign-in URL, since your application type is Multitenant and personal accounts, the Sign-in URL is https://login.microsoftonline.com/common
In your application code, apply this URL value in the Authority
setting. For more information about Authority
, see Microsoft identity platform application configuration options.
If the above solution is not work for you, please refer the Error AADSTS50020 - User account from identity provider does not exist in tenant
Hope this helps. Do let us know if you any further queries by responding in the comments section.
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.