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 instruction via STSADM command.

When 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

PowerShell cmdlet to migrate user: Move-SPUser –Identity "DOMAIN\OldUserName" –NewAlias "Domain\NewUserName"

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!) KB:

BTW, If its 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.


  1. Good one Salaudeen!

  2. stsadm.exe -o migrateuser -oldlogin DOMAIN\abcd -newlogin DOMAIN\adbc -ignoresidhistory

  3. Thank you Salaudeen!!


Please Login and comment to get your questions answered!

Powered by Blogger.