SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are currently in the process of changing (AD) domain and user names for users. This is done gradually, and the old and new domain/user names will coexist in a transition period.

A challenge we have is migrating sharepoint user profiles. Preferrably, data from the old mysite profile is moved or copied to the new profile/user when the user logs on the intranet with the new credentials the first time. Im thinking of doing this with a "hidden" web part on person.aspx.

However, I cannot find a C# equivalent to the Move-SPuser, and simply iterating blindly through all of the properties from the old profile and adding them to the new seems hairy. I suspect that there are some properties, like sid/guid etc. that should not be copied. Is this the way to do it? Is there a better way, or "best-practise" of migrating/copying user profiles to a new user?

share|improve this question
have you found a solution to this ? – user13696 Dec 18 '12 at 14:17
How are you migrating the users? ADMT? I'm not understanding why you can't use Move-SPUser/stsadm -o migrateuser in this case. As far as code, using the SPFarm.MigrateUserAccount would be the way to do it via code -…. – Trevor Seward Dec 18 '12 at 17:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.