SizeLimitExceededException when using LDAP

SizeLimitExceededException when using LDAP

When using a ldap browser like JXplorer to query AD, sometimes depending on the query the following error is displayed : 


javax.naming.SizeLimitExceededException:
[LDAP: error code 4 - Sizelimit Exceeded]; remaining name ’OU=Users,dc=example-cloud,dc=com’

Customer also gets an error using webadmin in webnetwork, webnetwork displays an error when trying to open this ou.
 
This means that Microsoft Active Directory is set to only display 1000 entries in a search and there are more than 1000 entries in that ou. Microsoft kb article http://support.microsoft.com/?kbid=315071 explains the issue and how to change the number of entries returned.

WebNetwork takes care of this by asking MS AD to page the results back instead of sending them all in one lump.