Hey,
I've read at least 20-30 articles on how SiteUserInfoList works and how SharePoint user remain in UserInfo table even after they've been deleted from the site collection.
The most useful have been:
http://www.sharepointdiary.com/2012/09/find-and-delete-orphaned-users-in-sharepoint.html
http://www.sharepointdiary.com/2013/07/find-and-delete-orphaned-users-in-sharepoint-using-powershell.html
http://zimmergren.net/technical/sharepoints-hidden-user-list-user-information-list
http://nikpatel.net/2010/08/10/delete-orphaned-ad-users-from-the-site-collection/
I have previously created an other thread, which has been resolved, but it is connected to this one:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/47ad1340-9827-492e-807b-0bfcc697291e/
So my problem is that all approaches try to remove users from SiteUsers/ Users collection or use PowerShell commands like "Remove-SPUser". In my scenario we got users from an alien active directory, which ended up in our UserInformationList because
we used a backup from a partner of us to create the sitecollection. When we first restored the backup, we remove their users from SiteUser and User collections after which they couldn't be found via people picker.
However, after migrating to an other server to SharePoint 2013 the old users appeared again. Now I can't remove them from SiteUsers, because they're not there anymore. They've been marked as deleted in UserInfo table, but I can't still find them. I can't add them, because they're from an alien AD. So I'm stuck in the middle of nowhere.
I also tried to get SPWeb.SiteUserInformationList, but when I tried to delete the specific list items, I keep getting:
Exception calling "Delete" with "0" argument(s):"<nativehr>0x80070005</nativehr><nativestack></nativestack>" or <Results><Result ID="" Code="-2147024891"><ErrorText>Access denied. You do not have permission to perform this action or access this resource.</ErrorText></Result>
Any help is appreciated!
Regards Andreas MCPD SharePoint 2010. Please remember to mark your question as "answered"/"Vote helpful" if this solves/helps your problem.