Move-SPUser works lovely if you have an SPUser object to pass into it. It will update the account name in the User Profile Service to the new account name and modify all the site permissions. However, how do you migrate a user profile for a user that has never logged into SharePoint before and thus isn't in the UserInfoList for any site?

I tried to use stsadm -o migrateuser but it doesn't seem to want to migrate an AD user to ADFS. I tried the following:

stsadm.exe –o migrateuser –oldlogin "i:0#.w|domain\accountname" –newlogin "i:0e.t|adfs|[email protected]" –ignoresidhistory

stsadm.exe –o migrateuser –oldlogin "mdco\accountname" –newlogin "i:0e.t|adfs|[email protected]" –ignoresidhistory

stsadm.exe –o migrateuser –oldlogin i:0#.w|domain\accountname –newlogin i:0e.t|adfs|[email protected] –ignoresidhistory

stsadm.exe –o migrateuser –oldlogin mdco\accountname –newlogin i:0e.t|adfs|[email protected] –ignoresidhistory

When running the first two, I get the error: Command line error. The second two yell at my syntax for leaving out the quotes around the account names.

I planned on running stsadm.exe in PowerShell via the following but I cannot even get it to work in a regular command prompt.

Set-Alias -Name stsadm -Value $env:CommonProgramFiles"\Microsoft Shared\Web Server Extensions\15\BIN\STSADM.EXE"


1 Answer 1


The user object needs to exist in a UIL. That's the primary responsibility of stsadm/Move-SPUser: to migrate users within the UIL to the new identity. The User Profile Service can, in certain scenarios, automatically migrate a user when it has detected a change, but from the sounds of it, you don't need to do any work for this particular user.

  • So the problem is that if I run a sync after migrating the users in SharePoint, I get a ton of errors regarding conflicting profiles. I want the usernames to be in the ADFS format, not the AD format to prevent those issues. Apr 6, 2016 at 15:25
  • If those users haven't logged in anywhere, which would include a MySite creation, then you should be able to simply delete the conflicting Windows profiles from the UPSA, correct?
    – user6024
    Apr 6, 2016 at 15:26
  • If I delete the profile and social databases and start fresh, those issues don't exist but I don't want to lose the users custom profile and social information. Apr 6, 2016 at 15:26
  • Okay, so you suggest that I just delete the old profiles and re run the sync? Apr 6, 2016 at 15:26
  • Or should I add those users to a temporary site collection so I have something to bind to Move-SPUser? Apr 6, 2016 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.