How to get the ID (as opposed to the UPN) of a SharePoint user

Edward Jarvis 0 Reputation points
2023-12-21T11:29:20.85+00:00

My question relates to the problem described on this page:

https://learn.microsoft.com/en-us/sharepoint/troubleshoot/sharing-and-permissions/fix-site-user-id-mismatch

The page refers to the "old ID" and the "new ID". Is there any way of getting these values? I'd like to use PowerShell to loop through all our SharePoint and OneDrive sites and delete all occurrences of the old ID while leaving all occurrences of the new ID in place.

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 30,181 Reputation points Microsoft External Staff
    2023-12-22T03:01:16.8166667+00:00

    Hi @Edward Jarvis ,

    To fix these issues, run the Site User Mismatch diagnostic by using a Microsoft 365 administrator account (Global Admin or SharePoint Admin).

    Site user id mismatch:https://aka.ms/PillarSiteUserIDMismatch

    When the diagnostic detects a user ID mismatch in the UserInfo list, it will offer to remove the old ID. After you accept and the old ID is removed, assign the new user account the appropriate permissions to the SharePoint site.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.


Your answer

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