node-activedirectory
node-activedirectory copied to clipboard
How to use paging
Hi , Thanks for this great package. Can you show me how do i use paging after 1000 records.
I need this too. I have a fuzzy logic search so I have to pull in some basic info for all users in ldap and run levenshtein search against some values like first name and last name.
Any update on this? I need this too
Please add this feature.it will really helpful.if not we are just getting first 1000 results
Hi All, Since there is no response long time. I decided to use ldapjs, I was able to fetch all records without paging.
let values = [];
let client = ldapjs.createClient(ldapOptions);
client.on('connect', function (){
client.bind(config.username, config.password, function(err) {
client.search("OU=Company-Users,DC=Company,DC=com", opts,
function(err, ldapresponse) {
ldapresponse.on('searchEntry', function(entry) {
// This is processed like event loop,
// you can write logic to capture as per your requirement
values.push(entry.object);
});
ldapresponse.on('page', function(entry, cb) {
//console.log("page event");
//if(cb) cb();
});
ldapresponse.on('end', function(result) {
// console.log('end event');
AsyncCallBack(values);
});
ldapresponse.on('error', function(resErr) {
console.log("error " + resErr);
});
});
});
});
Using above code i can able to fetch all the records of users, we have around 6000 records in LDAP. There is no performance issue.
Hope this will be help full.
Hi, any update on this? This package is working as required except paging is preventing me get all the results from AD. Can you please provide a way to override this?