The symptom
A partner or contractor was invited to your tenant and reports one of these:
- "I clicked the invitation link and got an error."
- "I signed in but it says my account doesn't exist in this tenant."
- "It says my organisation's policy doesn't allow access."
- "It worked last month and now it doesn't."
The error text the user sees usually includes an AADSTS code. Ask for it, with the timestamp and correlation ID. Then work through the checks below in order.
Quick map: error code to cause
| Code | Meaning | Usual cause | Fix |
|---|---|---|---|
AADSTS50020 | User account from the identity provider doesn't exist in the tenant | User signs in with a different account from the one invited, or the app sends guests to the wrong tenant endpoint | Confirm the invited address; use the tenant-specific sign-in URL; reset redemption |
AADSTS90072 | External account doesn't exist in the tenant and can't access the app | Guest object missing, deleted, or not yet redeemed | Re-invite or reset redemption |
AADSTS500213 | Your (resource) tenant's cross-tenant access policy blocks the user | Inbound B2B collaboration blocked by default or partner settings | Allow the partner, user or app inbound |
AADSTS500212 | The user's home tenant blocks outbound access to you | Partner's outbound policy | The partner's admin must allow your tenant |
AADSTS50105 | User isn't assigned to the application | App requires assignment | Assign the guest or a group to the enterprise app |
AADSTS53003 | Blocked by Conditional Access | A policy that targets guests, locations or device state | Find the policy in the sign-in log |
Codes can change and new ones are added. Check the sign-in log entry for the exact text.
Check 1: Find the failed sign-in
The sign-in log in your tenant tells you which side blocked the request. In Log Analytics (with Entra sign-in logs sent there):
SigninLogs
| where TimeGenerated > ago(2d)
| where UserPrincipalName has "partner.com" or AlternateSignInName has "partner.com"
| where ResultType != "0"
| project TimeGenerated, UserPrincipalName, AppDisplayName, ResultType,
ResultDescription, UserType, CrossTenantAccessType,
HomeTenantId, ResourceTenantId, ConditionalAccessStatus, CorrelationId
| order by TimeGenerated desc
A guest's UPN in your tenant looks like jane_partner.com#EXT#@contoso.onmicrosoft.com, so match on the domain. If nothing shows up, the request never reached your tenant. That usually means the user is signing in to their home tenant or the app's common endpoint, which points to AADSTS50020 or AADSTS500212.
In the portal: Entra ID > Monitoring > Sign-in logs, filter by user, and open the Conditional Access and Additional details tabs.
Check 2: Does the guest object exist, and did they redeem?
Connect-MgGraph -Scopes "User.Read.All"
Get-MgUser -Filter "userType eq 'Guest'" -All `
-Property displayName,mail,userPrincipalName,externalUserState,externalUserStateChangeDateTime,accountEnabled,createdDateTime |
Where-Object { $_.Mail -like "*@partner.com" } |
Select-Object DisplayName, Mail, ExternalUserState, ExternalUserStateChangeDateTime, AccountEnabled
ExternalUserState | What it means |
|---|---|
PendingAcceptance | Invitation sent, never redeemed |
Accepted | Redeemed. Check which account redeemed it (Check 3) |
| empty | Usually a member created directly, not through an invitation |
Also check AccountEnabled. Disabled guests fail sign-in even with a valid invitation. If there's no object at all, the guest was deleted. Look in Deleted users (restorable for 30 days) before you re-invite, because restoring keeps group memberships and app assignments.
Get-MgDirectoryDeletedItemAsUser -All |
Where-Object { $_.Mail -like "*@partner.com" } |
Select-Object Id, DisplayName, Mail, DeletedDateTime
Check 3: Redeemed with the wrong account
This is the most common cause of AADSTS50020. The invitation went to jane@partner.com, but Jane opened it in a browser signed in to a personal Microsoft account or another work account. The guest object is now bound to that identity, and her work account doesn't match.
Fix it with a redemption reset. The guest keeps its object ID, groups and app access, and the next redemption binds to the correct account:
Connect-MgGraph -Scopes "User.Invite.All","User.ReadWrite.All"
$guest = Get-MgUser -Filter "mail eq 'jane@partner.com'"
New-MgInvitation `
-InvitedUserEmailAddress "jane@partner.com" `
-InviteRedirectUrl "https://myapps.microsoft.com/?tenantid=<your-tenant-id>" `
-SendInvitationMessage:$true `
-ResetRedemption:$true `
-InvitedUser @{ Id = $guest.Id }
Tell the user to redeem in a private browser window. The portal has the same action under the user's Overview > B2B collaboration > Reset redemption status.
Tip
Give guests a tenant-specific link, such as
https://myapps.microsoft.com/?tenantid=<tenant-id>or the app URL with your tenant ID. Generic links that go throughlogin.microsoftonline.com/commonsign the user in to their home tenant, not yours.
Check 4: Cross-tenant access settings
AADSTS500213 means your inbound settings block the user. Look at the default and any partner-specific configuration:
Connect-MgGraph -Scopes "Policy.Read.All"
(Get-MgPolicyCrossTenantAccessPolicyDefault).B2BCollaborationInbound | ConvertTo-Json -Depth 6
Get-MgPolicyCrossTenantAccessPolicyPartner |
Select-Object TenantId, @{n='Inbound';e={$_.B2BCollaborationInbound | ConvertTo-Json -Depth 6 -Compress}}
If the default inbound policy blocks everyone, add an organisational setting for the partner's tenant ID (Entra ID > External Identities > Cross-tenant access settings > Organizational settings) and allow the relevant users, groups and applications.
AADSTS500212 is the partner's outbound policy. You can't fix it from your side. Send the partner's admin your tenant ID and ask them to allow outbound B2B collaboration to it.
While you're there, check inbound trust. If Conditional Access requires MFA for guests and you don't trust the partner's MFA, guests must register MFA in your tenant as well. That surprises users but isn't a block. It shows as an interrupt in the sign-in log, not a failure.
Check 5: The invitation itself fails
If the inviter gets an error before any email is sent, check who is allowed to invite and which domains are allowed:
(Get-MgPolicyAuthorizationPolicy).AllowInvitesFrom
Values are none, adminsAndGuestInviters, adminsGuestInvitersAndAllMembers and everyone. Domain allow and deny lists are under External Identities > External collaboration settings > Collaboration restrictions. A partner domain that's missing from an allowlist makes the invitation fail outright.
If the email never arrives, have the user check spam for mail from invites@microsoft.com. Or send the redemption URL yourself: New-MgInvitation returns InviteRedeemUrl when you set -SendInvitationMessage:$false.
Check 6: Signed in, but the app refuses
AADSTS50105: the enterprise app has Assignment required set to Yes. Assign the guest, or better, a group that contains your guests.AADSTS53003: open the sign-in log's Conditional Access tab. Policies that target "Guest or external users", block unknown locations, or require compliant devices block guests whose devices you don't manage.- The app shows its own "access denied": Entra issued a token, and the app's own authorisation rejected it. Check app roles and group claims.
Warning
Don't fix a guest problem by excluding all guests from a Conditional Access policy. Exclude a named group for a limited time and record the change.
Prevent it next time
- Invite with the exact work address the partner uses to sign in, and send a tenant-specific redemption link.
- Configure cross-tenant access for regular partners and agree on MFA trust before the project starts.
- Use access packages or access reviews to expire guests, so you don't keep stale
PendingAcceptanceaccounts around. - Keep a saved
SigninLogsquery filtered onUserType == "Guest"andResultType != "0"for fast triage. - Document who can invite (
AllowInvitesFrom) and the domain allowlist in your identity runbook.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get