About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
AADSTS50020 means the account that signed in is not known to the tenant that owns the application. For a guest, the cause can be an invitation that was never sent. It can equally be the wrong sign-in URL, a single-tenant app registration, or a person signed in with the wrong account. The message itself tells you which account and identity provider were used, so read those two values first.
What the error means
Microsoft's troubleshooting page gives the message a guest sees when trying to reach an application or resource in the resource tenant:
AADSTS50020: User account 'user@domain.com' from identity provider {IdentityProviderURL} does not exist in tenant {ResourceTenantName}.
On the same page, an administrator checking the sign-in logs on the home tenant (the guest's own organisation) finds a 90072 error code entry with this wording: "User account {email} from identity provider {idp} does not exist in tenant {tenant} and cannot access the application {appId}({appName}) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Microsoft Entra user account."
Two tenants are involved. The resource tenant owns the application. The home tenant holds the user's account. The error is raised because the resource tenant has no matching user, guest or otherwise, for the account that arrived. Your job is to find out why not.
The wrong-account case is easy to miss. Users reach an application through a direct link or through https://myapps.microsoft.com, and both send them to sign in. If the browser already holds a session for a personal account, or for their organisation account when they meant a personal guest account (or the reverse), the sign-in uses the session that is already there. The error then names an account the user did not think they were using, which is why the first check is the two values in the message.
Likely causes
The page lists eight causes. Match each to what you see.
| Cause | What you see | How to confirm |
|---|---|---|
| 1. Personal Microsoft account used at the Microsoft Entra admin center | Outlook, Hotmail or OneDrive account connects to the Microsoft Services tenant, which has no linked directory | The account is a personal one and the person expected a directory of their own |
| 2. App registration is single-tenant | Users from other directories cannot sign in | signInAudience in the manifest is not one of AzureADandPersonalMicrosoftAccount, AzureADMultipleOrgs or PersonalMicrosoftAccount |
| 3. Wrong sign-in endpoint | Authentication call uses a tenant-specific URL while users come from other organisations | The Authority in the application code |
| 4. Signed in to the wrong tenant or account | User and identity provider in the message are not the pair you expected | The User account and Identity provider values in the message |
| 5. Guest was not invited | No guest object exists in the resource tenant | The guest is missing from Entra ID > Users |
| 6. App requires user assignment | Guest exists but is not on the assigned list | Assignment required? is Yes on the enterprise application and the guest is not assigned |
| 7. Resource owner password credentials (ROPC) flow used for personal accounts | The sign-in uses ROPC and the account is personal | The authentication flow used by the application |
| 8. A deleted guest name was re-created by the home tenant administrator | The guest object is older than the home account of the same name | Creation dates differ, as shown below |
Prove the cause before changing anything
- Copy the user account and identity provider from the error. Ask the user to confirm that is the account they meant to use.
- In the resource tenant, search Entra ID > Users for the guest. If none exists, the cause is 5.
- In the Azure portal, search for and select Enterprise applications, select the application, then Properties, and read Assignment required?.
- In App registrations, select the application, then Manifest, and read the
signInAudiencevalue. - Read the Authority in the application's code or configuration. For a multitenant app the page lists
https://login.microsoftonline.com/organizations; for multitenant plus personal accounts,https://login.microsoftonline.com/common; for personal only,https://login.microsoftonline.com/consumers. With a tenant-specific URL (the page shows a placeholder for the tenant name or ID in that address), users from other organisations "can't access the application" unless they are added as guests in that tenant. - For cause 8, compare creation dates. The page confirms the scenario if the guest in the resource tenant was created before the home tenant's user account. These commands only read:
Get-EntraUser -UserId {id | userPrincipalName} | Select-Object id, userPrincipalName, createdDateTime
$p = @('Id', 'UserPrincipalName', 'CreatedDateTime')
Get-MgUser -UserId {id | userPrincipalName} -Property $p | Select-Object $p
Example (illustrative): Contoso (contoso.com.au) invites a bookkeeper at adatum.com.au to its supplier portal. Ruth, at ruth@adatum.com.au, gets AADSTS50020 naming her address. The Contoso user list has no guest for her: the invitation went to an old address. Contoso invites the right address, Ruth redeems it, and the sign-in works. Had the guest existed but been unassigned on an app with Assignment required? set to Yes, the same error would have appeared and cause 6 would be the fix.
Fix
Fix the one cause you proved.
- Cause 4: ask the user to sign out, then sign in again from a new private browser session or a different browser. This changes nothing in the tenant.
Risk (cause 1): creating a new tenant. The page's solution is to create an Azure account with a new tenant; you become the Global Administrator of the tenant. The page says the earlier behaviour, in which a directory was created and linked to the personal account, has changed. Nothing in your existing tenant is altered, but the page gives no steps to remove a tenant once it exists, so there is no documented way back. Create one only after step 1 of the proof list shows a personal account whose owner wants a directory of their own.
Risk (causes 3 and 7): changing the sign-in endpoint in the application. Save first: copy the current Authority value and note where it is set. For cause 3, change it to the URL that matches the application's account type, using the three authority URLs listed in step 5 of the proof list. For cause 7, use a tenant-specific endpoint, because ROPC is supported only within Microsoft Entra tenants, and personal accounts invited to a tenant cannot use it. A wrong value stops every user of the application from signing in, including those who work today. Back-out: put the saved Authority value back and save.
Risk (cause 5): inviting a guest. An invitation creates an external identity in your directory and can send a message to the person. Save first: confirm in Entra ID > Users that no guest exists for the address, and check the address with the person. The page points to Microsoft's quickstart for adding guest users: browse to Entra ID > Users, select Invite external user, complete the Basics tab, go to the final tab and select Invite. Back-out: delete the guest you invited, from Entra ID > Users. The quickstart's "Clean up resources" section says "Select the test user, and then select Delete user." Check the right guest is selected first. A deleted guest name that is later re-created by the home tenant administrator is the situation in cause 8, so delete only a guest invited in error.
Risk (cause 6): granting access to the application. Save first: note the current Users and groups list of the enterprise application. Assign the guest individually or through a group they belong to. In the Microsoft Entra admin center: Entra ID > Enterprise apps > All applications, select the application, then Users and groups > Add user/group. Group-based assignment requires Microsoft Entra ID P1 or P2, and the assignment does not cascade to nested groups, according to the Microsoft assignment page. A group assignment gives access to every member of that group. Back-out: on the same Users and groups pane, select the entry and select Remove, which the assignment page says unassigns the user or group from the application.
Disruptive step (cause 2): re-creating the app registration. The page says you cannot change signInAudience in the manifest, so the fix is a new registration with the correct account type. A new registration is a different application. Redirect URIs, secrets, certificates and API permissions are not said by the page to carry over, so check each one and set up again any that are missing, and update the application's own configuration with the new application (client) ID. Save first: copy the existing manifest into a file and list the redirect URIs, secrets (names and expiry only) and permissions. Back-out: keep the old registration unchanged until the new one works, and point the application back at the old client ID if needed. Do not delete the old registration.
Disruptive step (cause 8): resetting the guest's redemption status. This requires Helpdesk Administrator (the least privileged role listed) or User Administrator. The reset keeps the guest's object ID, group memberships and app assignments, but the user must redeem a new invitation before signing in again. Save first: record the guest's object ID, user principal name, mail and other mail addresses, group memberships and app assignments. The reset page documents no way to undo a reset; if it fails to resolve the problem, the guest must redeem again. In the admin center: Entra ID > Users, select the guest, then on the Overview tab under My Feed select Reset redemption status in the B2B collaboration tile, and under Reset redemption status select Reset.
Confirm the fix
- Ask the guest to sign out everywhere, then try the original link from a new private window.
- In the resource tenant, check the guest exists in Entra ID > Users and has redeemed.
- In the home tenant's sign-in log, confirm the 90072 entry no longer appears for a new attempt.
- For app-registration changes, test with a user from another directory and a user from your own.
What to watch afterwards
- New guests invited to apps with Assignment required? set to Yes. Invitations alone do not give access.
- Home-tenant administrators who delete and re-create users. Cause 8 can occur when a name is re-used.
- Application code that hard-codes a tenant-specific Authority.
Read next
Related articles you may want next.
- TroubleshootingAADSTS7000222: 'The provided client secret keys are expired' when a server application stops signing inAADSTS7000222 client secret keys are expired: confirm the end date, add a new secret or certificate to the app registration and roll it over safely.Read article
- TroubleshootingAADSTS50105: The signed in user is not assigned to a role for the applicationAADSTS50105: the app requires user assignment. Check Assignment required, assign the user or a direct-member group, and avoid nested groups.Read article
- TroubleshootingYour organization's policies do not allow you to share with these users: SharePoint and OneDriveSharePoint or OneDrive says your organization's policies do not allow you to share with these users? Check the three sharing levels and change only one.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The error can have more than one cause at once; fixing one may expose another.
- Reset redemption and app re-creation are not undoable by Microsoft's documented steps; follow the save-first lists.
- Roles, portal names and licence terms change. Group-based assignment depends on your Entra edition; check the current Microsoft pages.
Sources
- Error AADSTS50020 - User account from identity provider does not exist in tenant — Microsoft Learn, page dated 2026-01-15, accessed 20 November 2026
- Reset the redemption status for a guest user in Microsoft Entra External ID — Microsoft Learn, page dated 2026-04-17, accessed 20 November 2026
- Quickstart: Add a guest user and send an invitation — Microsoft Learn, page dated 2026-04-24, accessed 20 November 2026
- Manage users and groups assignment to an application — Microsoft Learn, page dated 2026-04-01, accessed 20 November 2026
This article was originally published on .