Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

Unable to Migrate users in SharePoint 2010 when logged in as a non System account(SharePoint\system) user.

$
0
0

 

We are currently looking at migrating SharePoint user account(AD user)  from domain\x to domain\y. 

I am using the SPFarm.MigrateUserAccount to do the same. Below is the code snippet.

This code runs fine when System account logs in however fails if any other user runs the same piece of code. 

Error:The specified old login name could not be found. No records had been updated. 

If you have come across a similar problem please provide assistance.

Note: Power shell  and stsadm commands are ruled out . Need to do it through a web app. Hence a c# solution is what we are looking at.

Code snippet:

 SPFarm Farm = SPFarm.Local; 

          if (myFarm != null)
                myFarm.MigrateUserAccount(
"Domain\\x""Domain\\y"true);

Environment:

·     SharePoint Server 2010

·     Windows Server 2008 Standard  R2

 



Viewing all articles
Browse latest Browse all 13778

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>