What the error means
AADSTS50020 is the Microsoft Entra code UserUnauthorized. A user from one identity provider or tenant tried to use an application in another tenant (the resource tenant), and the resource tenant has no matching account for them. Microsoft's reference says the account needs to be added as an external user in the tenant first, and that a user who should be a member should be invited through the B2B system.
The message names the account, the identity provider and the resource tenant, which tells you which of the documented causes applies. Microsoft adds that an administrator looking at the home tenant's sign-in logs sees the same failure recorded under error code 90072.
Common causes
Microsoft's AADSTS50020 troubleshooting article lists eight causes:
- A personal Microsoft account (Outlook, Hotmail or OneDrive) was used to sign in to the Microsoft Entra admin center, which connects to the Microsoft Services tenant with no directory to manage.
- The app registration is single tenant, so users from other directories or identity providers cannot sign in.
- A multitenant or personal-account app uses a tenant-specific sign-in URL instead of the matching common endpoint.
- The user is signed in to the wrong tenant or with the wrong account in the browser.
- The guest user was never invited to the tenant.
- The enterprise application requires user assignment and the user is not assigned.
- The resource owner password credentials (ROPC) flow was used with a personal account.
- The home tenant deleted and re-created the user name, so the guest object in the resource tenant is older than the home account.
How to fix it
1. Sign in again in a private browser window
Microsoft's fix for a session that uses the wrong account is to sign out, then open a new InPrivate or incognito session or a different browser and sign in with the intended account. Check that the account and identity provider in the error are the ones you meant to use.
2. Make sure the guest user was invited
In the resource tenant, an administrator should confirm the user exists as a guest. If not, invite them by following Microsoft's quickstart for adding guest users. If you work with partner organizations often, the cross-tenant access settings guide covers the B2B side.
3. Assign the user if the app requires assignment
In the Azure portal, open Enterprise applications, select the app, select Properties and check whether Assignment required is set to Yes. If it is, assign the user directly or through a group they belong to.
4. Developers: check the account type and sign-in URL
In the app registration, open Manifest and find signInAudience. A multitenant app needs AzureADMultipleOrgs, AzureADandPersonalMicrosoftAccount or PersonalMicrosoftAccount; Microsoft notes you currently cannot change signInAudience in the manifest, so re-create the registration with the right account type. Then point the Authority at the matching endpoint:
https://login.microsoftonline.com/organizations
https://login.microsoftonline.com/common
https://login.microsoftonline.com/consumersFor the ROPC flow, use a tenant-specific endpoint instead.
5. Reset redemption for a re-created home account
If the guest was created before the home tenant's account, compare creation dates. Microsoft shows this Microsoft Graph PowerShell check, run in each tenant:
$p = @('Id', 'UserPrincipalName', 'CreatedDateTime')
Get-MgUser -UserId {id | userPrincipalName} -Property $p| Select-Object $pIf the guest is older, reset the guest's redemption status in the resource tenant instead of deleting and re-creating it.
If nothing works
If you only wanted to manage a directory with a personal account, Microsoft's answer is to create an Azure account, which creates a new tenant with you as Global Administrator. Otherwise give the resource tenant's administrator the account, identity provider and tenant shown in the error, plus the correlation ID and time.
What we checked
Two Microsoft Learn pages were read on 2026-11-21. The Microsoft Entra error code reference defines AADSTS50020 as UserUnauthorized and says the account must be added as an external user. The dedicated AADSTS50020 troubleshooting article lists the eight causes, the sign-in URLs per application type, the creation date checks and the redemption reset. The error was not reproduced for this page.
Last checked: 2026-11-21.