I'm trying to query all the UserProfile objects imported into SharePoint 2010 User Profile Service using OM using this:

    SPServiceContext context = SPServiceContext.GetContext(site);
    UserProfileManager profileManager = new UserProfileManager(context);
    ProfileBase[] profiles = profileManager.Search(domainString);

It only ever seems to return a capped number of items, 200 apparently, when there are supposed to be over 1,000 user profiles imported from AD

Is there some sort of throttling or cap configured on items returned by this method? I haven't found any documentation on the internet to indicate that this method only returns a specific number limit of items.

Is this a defect?


Okay, I've got it from a Microsoft Certified Master for SharePoint 2010--

I’ve just disassembled the assembly and had a look at the Stored Procedure that is executed behind the scenes. Essentially the Stored Procedure just selects the top 200 results, so “yes” there is a limit of 200.

This limit is not documented on TechNet so far that I've seen

Need to use profileManager.GetEnumerator(); to get ALL the user profile objects

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.