How to Remove Legacy User Account for Sharepoint

Jayne Nicholson 0 Reputation points
2026-06-08T19:49:45.47+00:00

The company I previously worked for as a full time employee now employs me as a contractor. I have the same face forward credentials (user ID and email address) that I had as an employee. I'm trying to get into a spreadsheet in Sharepoint, and I get the following error message:

Sorry, something went wrong There is a legacy user account in this site with same email. Please ask site owner or administrator to remove the legacy user account from this site.

The owner of the spreadsheet is out on maternity leave, so she can't give me access. How can this be resolved?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Ian-Ng 14,140 Reputation points Microsoft External Staff Moderator
    2026-06-08T21:14:58.8566667+00:00

    Hi @Jayne Nicholson

    Thank you for posting the details. 

    Based on the error message you provided, this issue is commonly caused by a legacy SharePoint user entry that is still associated with your previous account. Although your current contractor account uses the same email address, recreated accounts can have a different internal ID, and as a result, mismatches may occur.

    In this situation, the spreadsheet owner does not necessarily need to resolve the issue. Instead, your SharePoint admin or site collection admin is typically best positioned to assist. Therefore, the recommended first step is to have your Microsoft 365 / SharePoint admin run Microsoft’s Site User ID Mismatch diagnostic for the affected user and site, as this is the supported approach for resolving such mismatches.

    If the issue persists after running the diagnostic, your admin may also need to remove any outdated (stale) user entries from the affected SharePoint site and then reassign permissions to your current account. This is important because old user data can remain cached in SharePoint’s UserInfo list and may require cleanup in these scenarios.

    Furthermore, your IT admin can refer to this article for guidance on removing outdated user accounts: Remove users from SharePoint - SharePoint in Microsoft 365 | Microsoft Learn 


    If your administrator needs help with these steps or prefers a deeper investigation, they can open a support ticket through the Microsoft 365 admin center. A SharePoint support engineer will be able to assist them directly. Microsoft documentation for this type of recreated-account or mismatched ID scenario recommends opening support request whenever additional assistance is required.

    I hope this helps. Should you have any further questions, please feel free to reach out.


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    2 people found this answer helpful.

  2. AI answer

    2026-06-08T19:49:58.9433333+00:00

    The legacy account must be removed from the SharePoint site and, if needed, from Microsoft Entra ID (Azure AD). Any SharePoint site collection administrator or Microsoft 365 admin (not necessarily the document owner) can do this.

    1. Ask a SharePoint admin/site collection admin to remove the legacy user from the site:
      • Go to the affected SharePoint site.
      • Edit the URL in the browser and append:
             _layouts/15/people.aspx/membershipGroupId=0
        
        Example:
             https://<contoso>.sharepoint.com/_layouts/15/people.aspx/membershipGroupId=0
        
      • In the People and Groups page, select the legacy user entry that matches the old account.
      • Select Remove User Permissions.
      • Re‑grant access to the spreadsheet using the current account if needed.
    2. If the legacy account is an external/guest account, remove it at the tenant level (Microsoft 365 admin or SharePoint admin): Option A – Microsoft 365 admin center (Microsoft 365 for Business):
      • Go to the Microsoft 365 admin center.
      • In service settings, select Manage Organization-wide settings.
      • Select sites and document sharing > Remove individual external users.
      • Select the external user and choose Delete.
      Option B – SharePoint Online Management Shell (other subscriptions):
      • Start SharePoint Online Management Shell.
      • Run:
             $cred = Get-Credential
             Connect-SPOService -Url https://<contoso>-admin.sharepoint.com -Credential $cred
             $ExtUser = Get-SPOExternalUser -filter <******@contoso.com>
             Remove-SPOExternalUser -UniqueIDs @($ExtUser.UniqueId)
        
      • Replace <******@contoso.com> with the affected email.
    3. If there is a user ID mismatch (old account deleted and re‑created with the same UPN), run the Site User Mismatch diagnostic or manually remove the old user from the UserInfo list and then re‑grant permissions:
      • Use the diagnostic described in “Fix site user ID mismatch in SharePoint or OneDrive” to automatically detect and fix mismatched IDs.
      • Or manually remove the old user from the UserInfo list (site-by-site) and then assign permissions to the new account.

    Once the legacy entry is removed and the current account is granted permissions, access to the spreadsheet should work without the legacy account error.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.