gheeres / node-activedirectory

ActiveDirectory is an Node.js ldapjs client for authN (authentication) and authZ (authorization) for Microsoft Active Directory with range retrieval support for large Active Directory installations.
MIT License
534 stars 146 forks source link

Not returning all users? #249

Open ennwise opened 6 months ago

ennwise commented 6 months ago

I'm calling the library using code similar to:

        const config = {
            query: `CN=*`,
            includeMembership: ['user'],
            includeDeleted: false
        };

        this.ad.find(config, (err, results) => { 
                        let compiled = [];
            if (membership.indexOf('user') > -1) {
                compiled = compiled.concat(results.users);
            }
                           resolve(api.processResults(opts, compiled));
                    });

Results contains 1000 items, 51 of which are the users I'm interested in. I was expecting that the library would handle the request and return more than 1000 items and thus the resulting list would have all of the users in the directory rather than just the 51 that get returned.

I know there is a 1000 item query limit in AD, and I was expecting the library managed this for me and would return all results - how do I get the full result set?