How to resolve the error that guest users receive when accessing shared content from SharePoint Online.
A common cause is when the external user changes their primary email address, UPN, or both. This guide also helps with related identity mismatch scenarios.
The guest object in your tenant is tied to an immutable identity reference, not just the current email address. If the guest identity changes, your tenant may still expect the old claim.
Result: Microsoft reports that the account does not exist in the tenant because the stored guest mapping no longer matches the user signing in.
The second step is the one most people miss. It is often required to fully resolve the issue.
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/yoursite" -Interactive
# Find the user
$user = Get-PnPUser | Where-Object { $_.Email -eq "oldemail@example.com" }
# Remove the user
Remove-PnPUser -Identity $user.LoginName
# or
$user | Remove-PnPUser
Once complete, the guest should be able to re-access after being re-invited with their current identity.