Hi @studio
Thank you for posting this in Microsoft Q&A.
When a guest user tries to access your application in a tenant, the sign-in fails, and an error message appears, such as "AADSTS50020: User account 'example@hotmail.com' from identity provider 'live.com' does not exist in tenant 'Default Directory' and cannot access the application 'XXX' in that tenant.
Based on the information you provided, I understand that you have created an application registration with a supported account type as "Accounts in any organizational directory (Any Azure AD tenant - Multitenant)" and personal Microsoft accounts (e.g., Skype, Xbox). However, you are using the wrong authorization and token endpoint.
If you use https://login.microsoftonline.com/<YourTenantNameOrID>
, users from other organizations cannot access the application. You need to add these users as guests in the tenant specified in the request. In this scenario, authentication is expected to occur within your tenant only. This causes the sign-in error if you expect users to sign in using federation with another tenant or identity provider.
Use the https://login.microsoftonline.com/common
endpoint for Multitenant and personal accounts.
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.