How do you get SharePoint back in sync when you change a user's sAMAccountName?
Posted
by
Kirk Liemohn
on Server Fault
See other posts from Server Fault
or by Kirk Liemohn
Published on 2011-02-11T19:36:12Z
Indexed on
2011/02/11
23:27 UTC
Read the original article
Hit count: 408
sharepoint
|sharepoint-2010
I have observed on SharePoint 2010 that if you change the sAMAccountName of a user after the user has logged into a SharePoint site collection, the tp_Login field in the UserInfo table does not get updated. It still has the old user Id.
While the user can log into SharePoint under the new account, these new logins do not update the table. I have code that looks at the SPUser.LoginName and this value appears to be the tp_Login field value which is now old. The fact that this value is old causes my code to fail.
I suspect this behavior is identical in SharePoint 2007.
Is there any way to force SharePoint to recognize the new sAMAccountName? I suspect that profile synchronization might help, but I would like for my solution to work with WSS 3.0 and SharePoint 2010 Foundation.
I considered manually updating the database table, but I would like to stick with supported approaches.
© Server Fault or respective owner