Closed jayrungta closed 7 years ago
That's Active Directory's natural result limitation. You need to pass in an options object with the ldapjs paged option enabled.
Thank you for the quick response.
If I were to turn on paging, how would I go about parsing each page of results? Would the response have event handling like explained on the ldapjs website?
res.on('page', function(result) {
console.log('page end');
});
I'm not intimately familiar with this codebase any longer, and the docs have always been lacking. If I recall correctly, once paging is enabled this library will pull back everything and return the results to you in one big array/object.
You are absolutely right. The moment I set paged = true, I started getting all the results. It definitely needs better documentation.
Thanks again for helping me so quickly. Cheers!
@jayrungta glad you got it working. I am definitely open to PRs for documentation.
So I am trying to query users using the findUsers function. However, the result I am getting is being limited to 1000 users only. I know for a fact that there are more than 1000 users that should be returned. Please tell me how do I go about getting the full results and not only 1000.
Here is an excerpt of the code I am using: