A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
I raised a ticket with Microsoft, regarding existing guest users unable to re-enter sites / libraries / folders they previously had access to. This is Microsofts' response. (These instructions have fixed the issue):
"Thank you for the detailed summary and for the thorough remediation steps you have already taken — that context is extremely helpful.
Based on the symptoms described and the error message "There is a legacy user account in this site with the same email", this is consistent with a SharePoint User Information List (UIL) identity conflict, which occurs when a guest account is deleted and recreated with the same email address.
Root Cause Explanation
Every SharePoint site collection maintains a hidden list called the User Information List (UIL). When a user (including a guest) is granted access to a site or first interacts with it, SharePoint caches their identity information in this list — including a unique identifier (PUID) that is separate from their email address or UPN.
When a guest account is deleted from Entra ID and a new guest account is created with the same email, the new account is assigned a new PUID by Entra ID. However, the old PUID remains cached in the UIL of every site the user previously visited. During authorisation, SharePoint compares the PUID in the authentication token against the PUID stored in the UIL — because these no longer match, access is denied, even though the email address appears correct and the user has been re-added to the appropriate permission groups.
This also explains why:
- Approving access requests does not resolve the issue (SharePoint writes permissions against the stale UIL entry).
- Direct sharing and managed access fail (the old identity reference blocks the new account).
- The "copy link" method surfaces the explicit error about a legacy account with the same email.
- The M365 Admin Centre may not flag a mismatch, as the diagnostic evaluates differently depending on the access context and entry state.
Recommended Remediation Steps
Since this issue spans multiple sites, the legacy user entry must be removed from the UIL on each affected site collection individually. Below are two methods:
Method 1 — Via the SharePoint UI (per site)
- Navigate to each affected site and append the following to the site URL:
/_layouts/15/people.aspx?MembershipGroupId=0For example:https://yourtenant.sharepoint.com/sites/sitename/_layouts/15/people.aspx?MembershipGroupId=0 - Locate the external user in the list (look for the guest's email address).
- Select the checkbox next to their name, then from the Actions menu, select Delete Users from Site Collection.
Method 2 — Via SharePoint Online PowerShell (recommended for multiple sites)
- Connect to SharePoint Online Management Shell as a SharePoint Administrator.
- Run the following command for each affected site collection:
Remove-SPOUser -Site
Replace the site URL and login name with the actual values for each external user.
After removing the legacy entry from the UIL:
- Re-grant permissions to the guest user on each site (e.g., via site permissions, sharing, or adding to the appropriate SharePoint group). This will create a fresh UIL entry with the correct PUID.
- Allow up to 24 hours for changes to fully propagate across the service.
Additionally — Run the Site User ID Mismatch Diagnostic:
Although the M365 Admin Centre did not flag a mismatch initially, I recommend running the dedicated diagnostic tool as a supplementary step:
- Navigate to: https://aka.ms/PillarSiteUserIDMismatch
- Sign in as a Global or SharePoint Administrator.
- Enter the affected guest user's email and the URL of each impacted site.
This diagnostic performs a broader range of validations for both internal users and guests and may detect and resolve residual conflicts that are not visible through the standard admin checks."
When I asked them to clarify step "4. Allow up to 24 hours for changes to fully propagate across the service.", this was their response:
"To summarize the flow:
Remove the user from site permissions/groups.
- Navigate to /_layouts/15/people.aspx?MembershipGroupId=0 and delete the user from All People.
- Wait up to 24 hours.
- Re-grant access by adding them back to the correct group/share.
- User accepts the invite and tries access immediately."
The instructions above have fixed the issue.