Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 - msdn.microsoft.com/en-us/library/…. –  Trevor Seward Dec 18 '12 at 17:29
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.