Click here to Skip to main content
15,441,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I'm updating around 100,000 sharepoint user profiles programmatically, in C#, using the UserProfileManager.

In my tests, it appears that each user profile update is taking me 0.7 seconds to finish. Is this about right? At this rate, it'll take me 17.5 hours to complete the update process.

I'm using code similar to below:
using (var spSite = new SPSite(txtUrl.Text))
    var spContext = SPServiceContext.GetContext(spSite);
    var userProfileManager = new UserProfileManager(spContext);


    var accountName = "MyAD\\mickey.mouse"; // hard code for now
    var userProfile = userProfileManager.GetUserProfile(accountName);

    userProfile["WorkEmail"].Value = "";


Am I doing anything wrong? Any better way to do this?
I'm hoping I'll be able to finish the update process in a few hours only.

Thanks in advance.

Updated 9-Oct-11 14:47pm

1 solution

Nothing wrong that I can see, you are just trying to make a massive update. What is it you are trying to update and why isn't it being handled by Profile Sync job?
Share this answer
Rafferty Uy 9-Oct-11 22:30pm     CRLF
I'm migrating data into some custom properties, so the sync job won't be able to take those in. I'm trying to thread this out, hopefully that will improve the performance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900