"The size limit for this request was exceeded" encountered when running PeoplepPickerUpdateSites.xml

If you have HMC 4.0 with Windows SharePoint Services 3.0 SP1, it is recommended you deploy the following Update Rollup 1.

 

Description of Update Rollup 1 for the Hosted SharePoint services in Hosted Messaging and Collaboration 4.0, https://support.microsoft.com/default.aspx/kb/952075/en-us

 

When you are deploying the HMC 4.0 Update Rollup 1 for Hosted SharePoint Services, you may encounter a problem running the last step if you have more organization than your Active Directory's MaxPageSize setting.

 

The last step in this article is running the PeoplePickerUpdateSites.xml,

 

1. On the MPS server, open the PeoplePickerUpdateSites.xml file that is located in the following folder: Drive:\Program Files\Microsoft Hosting\Provisioning\Samples\Managed SharePoint 2007\

 

2. Remove the read-only attribute from the file and open it for editing.

 

3. On the preferredDomainController node, point to the domain controller that you use.

 

4. Save the file, and then run the following command:

          provtest.exe –x2 PeoplePickerUpdateSites.xml

 

This step queries the Active Directory, OU by OU, retrieving any SharePoint site information in the Active Directory and then set the necessary settings such as the UserAccountDirectoryPath accordingly.

 

The problem is that this PeoplePickerUpdateSites.xml file was not scripted to cater for paging, specifically in the portion where it tries to retrieve the all the OUs in the Active Directory. If the environment's MaxPageSize has been set to 1,000 (which is the default) and if you have more than 1,000 hosted organization (meaning more than 1,000 OUs) in the environment, this step will error out, giving you an error description "The size limit for this request was exceeded".

 

In order to allow the script to continue,

 

1. Edit the PeoplePickerUpdateSites.xml

2. Search for the section "Search all OUs"

3. Add <preferences> section such as the following,

 

************************************************************************************

Search all OUs

************************************************************************************

    -->

 <execute namespace="Preferred DC Active Directory Provider" procedure="Search" impersonate="1">

<executeData>

 <filter>objectClass=organizationalUnit</filter>

 <propertyList>

 <property name="distinguishedName"></property>

 </propertyList>

 

  <preferences>

<preference>

                                <searchPref>

                                      ADS_SEARCHPREF_SEARCH_SCOPE

                                </searchPref>

                                 <type>ADSTYPE_INTEGER</type>

                                 <value>ADS_SCOPE_SUBTREE</value>

                                </preference>

               </preferences>

 </executeData>

 <before source="procedureData" sourcePath="hostingOUPath" destination="executeData" destinationPath="path" mode="merge" />

 <before source="data" sourcePath="preferredDomainController" destination="executeData" />

 

4. Then rerun the XML file, provtest.exe –x2 PeoplePickerUpdateSites.xml. The above will change the search scope and allow retrieval of all the OUs.