Recreated user is unable to acces shared file in MS Teams.

By Nishant Rane

Updated on:

Views: 217

This is a known issue in Microsoft 365 environments when:

  • A user is deleted from Active Directory (AD) or Microsoft 365.
  • Later, a new account is created with the same User Principal Name (UPN).
  • The new account gets a new Object ID, but SharePoint and OneDrive still reference the old ID in their internal UserInfo lists.

This mismatch causes:

  • Access Denied errors
  • File download issues in Teams
  • Permission problems in SharePoint/OneDrive

โœ… Recommended Fixes

1. Run Microsoftโ€™s โ€œSite User ID Mismatchโ€ Diagnostic

Use the Microsoft 365 Admin Center to run the diagnostic:

โš ๏ธ Note: This may take up to 24 hours to fully propagate changes.


2. Manually Remove Old User from SharePoint Site Collection

If the diagnostic doesn’t help, manually remove the old user:


3. Check Teams File Permissions

Since Teams stores files in SharePoint/OneDrive:

  • Right-click the file in Teams โ†’ Manage Access
  • Ensure the new user is listed and has download permissions
  • If not, re-share the file directly from SharePoint or OneDrive

4. Clear Teams Cache (Client-Side)

Ask the user to:

  • Sign out of Teams
  • Clear Teams cache:
    • Windows: Delete %appdata%\Microsoft\Teams folder
  • Sign back in

5. PowerShell Option (Advanced)

If you manage multiple sites and want to automate cleanup:

  • Use PnP.PowerShell to:
    • Detect mismatched IDs
    • Remove old users across multiple sites
    • Reassign permissions

Leave a Comment