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

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?

share|improve this question
    
Is this related? social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/… –  zee Jun 26 '11 at 23:55

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer

Your Answer

 
discard

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

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