is it possible to add pagination in ldap get all members query?

5.2k views Asked by At

I am getting all memebers from AD group with the query

(&(objectClass=user)
    (memberof:1.2.840.113556.1.4.1941:=CN=GroupOne,OU=Security Groups,OU=Groups,DC=YOURDOMAIN,DC=NET)

But it is just giving first 1000 users in that group because of default pagination.How to get next set of 1000 users results? is it possible to add pagination in same query?

I am using ldapjs with node.js as a client.Please give some example query with pagination.

1

There are 1 answers

4
Gabriel Luci On

The documentation for LDAPJS talks about this: http://ldapjs.org/client.html#paging

Basically, use the the paged property when searching. You may have to set the sizeLimit to 1000 (or less) too.