Tuesday, June 17, 2014

How to delete users from UserInformation hidden List

Today, one of the user reported that he has re-joined the company , and he is not able to access any of the SharePoint sites. The site-collection owner gave permission to this user , using the old identity, because the people picker will show identities from UserInformation List(hidden list)

As you know SharePoint maintains a hidden list called UserInformation list to store identities located at http://<SiteCollectionUrl>/_catalogs/users/detail.aspx . I used the following power-shell script , just to refresh his identity in User Information List. It did not work.

$web=Get-SPWeb "http://ABC.com/sites/XYZ"
$web|Set-SPUser -identity "Domain\UserID" -SyncFromAD

After further digging, I found a way to delete the user's old identity from the  UserInformation List. Here are they.

1) Choose any  SharePoint groups in the Sitecollection. It will route to the following URL(http://<SiteCollectionUrl>/_layouts/people.aspx?MembershipGroupId=XXXXX)
2) Replace XXXXX with 0.
3) You should be able to see all the users
4) Delete the user whom you want to delete

After performing these steps , now the UserInformation List shows the recent identity of the user and the user was able to access the SharePoint sites.

BTW: Does anyone have any Power Shell script to do this activity?

1 comment: