SharePoint 2010: Problems with old and new logins

Hi all,

This problem affects in a SharePoint farm where a user at the beggining of the project were using an UPN but some time later the IT guys, decided to change the UPN to another one. So what happened? In a certain Site collection we have a register with the oldloginname but in other site collections were used the new user login name.

So, we have several workflows in the site collection where the user named used is the old and this workflows were failing, I investigated the root and was this, the change of the UPN. So what can we do to solve this problem?

At first time I thought to use the stsadm -o migrateuser command, but then I realized that is it possible to use PowerShell commands to do this.

First I checked the credentials of the user with the following command:

Get-Spuser -web “https://…” -identity “domainoldloginname”

And I focused on the loginname and userlogin were where appearing the oldloginnames instead of the new one, If I execute the command with the new username, the shell will return nothing.

Then I used the command

Move-spuser -identity “domainold_username” -newalias “domainusername” -web “https:/urlsc”

But I received the following error message: “Move-SpUser: The parameterless Read method can only be used when this instance was initialized with an SPUser object”

So I decided to use the following command:

$user = get-spuser -identity Domainold_username -web https://sitecol
Move-SPUser -Identity $user -NewAlias “DOMAINjdoe”

But again I received another error: “Move-SPUser: SID history can only be enforced in Windows authentication method”. So I used the following:

$user = get-spuser -identity Domainold_username -web https://sitecol
Move-SPUser -Identity $user -NewAlias “DOMAINjdoe” -ignoresidhistory

Now If I execute the Get-Psuer command again, it returns the right information, so now the parameters are correct or I hope son.

Till the next troubleshooting!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s