Jai
Jai

Reputation: 11

Active Directory returns only 1000 records(PHP)

I have 61000 records that i have to fetch but i am able to retrieve only 1000 records. I have tried Zend Pagination for retrieving the data, but that did not work.

Can any one help me out.

Upvotes: 0

Views: 3421

Answers (1)

EricLavault
EricLavault

Reputation: 16095

This limit is set by AD's MaxPageSize and it defaults to 1000, so it's a normal situation.

MaxPageSize - This value controls the maximum number of objects that are returned in a single search result, independent of how large each returned object is. To perform a search where the result might exceed this number of objects, the client must specify the paged search control. This is to group the returned results in groups that are no larger than the MaxPageSize value. To summarize, MaxPageSize controls the number of objects that are returned in a single search result.

You can't change this limit from the client side, but you can still overcome paginated results using LDAP pagination control.

Note that pagination control is a LDAPv3 protocol feature so don't forget to set the option :

ldap_set_option($con, LDAP_OPT_PROTOCOL_VERSION, 3);

See also Simple Paged Results Control.

Upvotes: 2

Related Questions