User’s Account Name Changed in Active Directory. How to Sync it in SharePoint?
We had a user account in Active Directory: EU\susanapi. Later there was a change in User name. It become: EU\suzanapi. But even after several user profile imports, the old user name: EU\susanapi was still showing up in SharePoint, and SharePoint treated the new user account as a separate account.
What is the Fix?
Unfortunately, Sharepoint doesn’t understand this change automatically. We need to make it understand by giving instructions via STSADM command.
When the user’s Account Name (or Login Name: Domain\User) renamed in Active Directory, you have to use stsadm -o migrateuser command to associate the new AD account with an existing SharePoint profile.
stsadm -o migrateuser -oldlogin EU\susanapi -newlogin EU\suzanapi -ignoresidhistory
Before the Fix:
After the Fix:
I had to do the same thing When users left the company, their accounts are deleted in AD (But their profiles are not deleted in SharePoint). After some time they came back! New AD-Account created, and I just used the “MigrateUser” command to associate the new account with their existing user profile.
By this, All their profile Data, Security Settings, tasks assigned, and My Site are associated back with the users. This procedure also applies when we migrate users from other domains. (or during domain Renames!).
BTW, If it’s for any other properties like Display Name, First Name, Last Name, etc, Profile imports should sync it back with SharePoint. If you need the change urgently either you can trigger the Profile import on-demand or you can update the user property by SPUser.Property=something or with PowerShell Set-SPUser cmdlet.
3 thoughts on “User’s Account Name Changed in Active Directory. How to Sync it in SharePoint?”
Thank you Salaudeen!!
stsadm.exe -o migrateuser -oldlogin DOMAINabcd -newlogin DOMAINadbc -ignoresidhistory
Good one Salaudeen!