Entra ID sign-in error
AADSTS50020: User account does not exist in the tenant
AADSTS50020 means an account from another identity provider, often a guest or personal account, cannot sign in to this tenant. Eight causes and their fixes.
AADSTS50020
Users are unauthorized to call this endpoint.
What it means
An account from another identity provider, usually a guest from another organisation or a personal Microsoft account, cannot sign in to this tenant: it does not exist here, or it cannot use the app. Microsoft lists eight causes. They include a guest who was never invited, a single-tenant app, a sign-in URL for the wrong tenant, an app that requires assignment, and a guest whose home account was deleted and created again.
Fix it: tenant admins
- Guest never invited: if the person should have access, go to
Entra ID > Users > New user > Invite external userin the Microsoft Entra admin center and invite the account. You need at least Guest Inviter or User Administrator. - App requires assignment: assign the guest, or a group they are in, as for AADSTS50105.
- Home account deleted and created again: compare the creation dates of the guest and of the home account. If the guest is older, first confirm with the other organisation that the new account belongs to the same person. The reset keeps the guest's object ID, group memberships and app assignments, and whoever redeems the new invitation gets them. Then open the guest user, select
Reset redemption statusin the B2B collaboration tile on the Overview tab and selectReset. The guest must redeem the new invitation before signing in. You need Helpdesk Administrator or User Administrator. - The same failure shows as AADSTS90072 in the sign-in logs of the user's home tenant.
Fix it: app developers
- A single-tenant app cannot accept accounts from other directories. If only a few outside people need it, keep it single-tenant and ask an admin to invite them as guests. Changing the account type lets accounts from any Microsoft Entra organisation sign in. If the app is meant for other organisations, Microsoft's articles disagree on how: one says change
Supported account typeson the app's Authentication page, the other says create the registration again with the right account type. - Use the sign-in endpoint that matches the accounts you accept: /organizations for any work account, /common to add personal accounts, /consumers for personal accounts only. A tenant-specific URL admits only that tenant's users and its guests.
- ROPC does not work with personal Microsoft accounts.
Fix it: the person signing in
- Check the user account and identity provider in the error are the ones you meant to use.
- Sign out, then try again in an InPrivate window or another browser, so a session in the wrong tenant is not reused.
Related codes
Microsoft sources
- Error AADSTS50020: user account from identity provider does not exist in tenant
- Add B2B collaboration users in the Microsoft Entra admin center
- Reset redemption status for a guest user
- Microsoft Entra authentication and authorization error codes (the full list)
- Microsoft's live lookup for 50020 (login.microsoftonline.com)
Find who is hitting AADSTS50020
Sign-in logs record the code without the AADSTS prefix: as status/errorCode in Microsoft Graph S04 and as ResultType in the SigninLogs table in Log Analytics S05. The SigninLogs and Microsoft Graph queries below cover interactive sign-ins. Non-interactive sign-ins are in the AADNonInteractiveUserSignInLogs table, which documents the error code in ResultSignature S41. If you query that table, test ResultType as well. For one failed sign-in, paste its error message into the lookup to get queries for its Correlation ID.
Log Analytics (KQL), last 7 days
SigninLogs
| where TimeGenerated > ago(7d) and ResultType == "50020"
| summarize Failures = count(), Last = max(TimeGenerated) by UserPrincipalName, AppDisplayName
| sort by Failures descMicrosoft Graph PowerShell, last 7 days
Connect-MgGraph -Scopes "AuditLog.Read.All"
$since = (Get-Date).ToUniversalTime().AddDays(-7).ToString("yyyy-MM-ddTHH:mm:ssZ")
Get-MgAuditLogSignIn -Filter "status/errorCode eq 50020 and createdDateTime ge $since" -All |
Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, CorrelationIdReading sign-in logs needs at least the Reports Reader role S06; the Graph call needs the AuditLog.Read.All permission S42, and -All returns every page of results S69.
Sources for this page
Microsoft's description is quoted from the Microsoft Entra error code reference; it is Microsoft's text and is not covered by our CC BY 4.0 licence. The cause and fix steps are our own wording, published under CC BY 4.0; each source below is the Microsoft page they rest on, with the passage we checked. Rules for every page are in the methodology.
S33. Microsoft (Microsoft Learn), Error AADSTS50020: User account from identity provider does not exist in tenant. Retrieved 2026-11-25.
When an administrator reviews the sign-in logs on the home tenant, a "90072" error code entry indicates a sign-in failure.
you are connected to the Microsoft Services tenant by default. Within the default tenant, there is no linked directory for performing any actions.
If your app registration is set to a single-tenant account type, users from other directories or identity providers can't sign in to that application.
If you use https://login.microsoftonline.com/<YourTenantNameOrID>, users from other organizations can't access the application. You have to add these users as guests in the tenant that's specified in the request.
Instruct the user to open a new in-private browser session or have the user try to access from a different browser.
The guest user who tried to sign in was not invited to the tenant.
The Microsoft identity platform supports ROPC only within Microsoft Entra tenants, not personal accounts.
The scenario is confirmed if the guest user was created before the home tenant's user account was created.
S34. Microsoft (Microsoft Learn), Quickstart: Add a guest user and send an invitation. Retrieved 2026-11-25.
Select Invite external user from the menu.
S35. Microsoft (Microsoft Learn), Reset redemption status for a guest user. Retrieved 2026-11-25.
reset the user's redemption status and reinvite the user while keeping the user's object ID, group memberships, and app assignments.
On the Overview tab, under My Feed, select the Reset redemption status link in the B2B collaboration tile.
S36. Microsoft (Microsoft Learn), Application configuration options (MSAL). Retrieved 2026-11-25.
If your application is intended for external users, avoid the common and organization endpoints.
S18. Microsoft (Microsoft Learn), Convert a single-tenant app to multitenant on Microsoft Entra ID. Retrieved 2026-11-25.
select the Authentication pane and navigate to the Supported account types section. Change the setting to Accounts in any organizational directory.
S50. Microsoft (Microsoft Learn, Microsoft Entra External ID), Add B2B collaboration users. Retrieved 2026-11-25.
Select New user > Invite external user from the menu.
S04. Microsoft (Microsoft Learn, Microsoft Graph), signIn resource type. Retrieved 2026-11-25.
Supports $filter (eq) on errorCode property.
The request ID sent from the client when the sign-in is initiated. Used to troubleshoot sign-in activity.
S05. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - SigninLogs. Retrieved 2026-11-25.
Provides the 5-6 digit error code that's generated during a sign-in event. 0 indicates success; other values are failures.
The identifier that's sent from the client when sign-in is initiated.
S06. Microsoft (Microsoft Learn), How to troubleshoot sign-in errors. Retrieved 2026-11-25.
Reports Reader is the least privileged role required to access the activity logs.
any user can access their own sign-ins from https://mysignins.microsoft.com.
S41. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - AADNonInteractiveUserSignInLogs. Retrieved 2026-11-25.
Contains the error code, if any, for the sign-in operation.
S42. Microsoft (Microsoft Learn, Microsoft Graph), List signIns. Retrieved 2026-11-25.
To avoid having the request time out, apply the $filter parameter with a time range for which to get all sign-ins
Sign-ins that are interactive in nature
S69. Microsoft (Microsoft Learn, Microsoft Graph PowerShell), Get-MgAuditLogSignIn (Microsoft.Graph.Reports). Retrieved 2026-11-25.
-All List all pages.
