How to do sizeLimit in NodeJs with LDAP 2.3.3

Viewed 11

I'm using the NodeJs-ldap2.3.3 library to connect to our LDAP. The issue I'm running into is that despite setting a size limit on the search, I keep getting SIZELIMIT_EXCEEDED errors on any query that would return too many results. If I use paged:true, Its always return all result instead of limited results. How to display top 'N' records data from LDAP using nodejs.

 var opts = {
                filter: (('Email=*@foo.com')),
                scope:'sub',
                sizeLimit: 5
            } ;
                client.search('dc=foo,dc=com', opts, function(err, res) {
                res.on('searchEntry', function(entry) {
                    
                });

Error: The search operation has sent the maximum of 5 entries to the client.

0 Answers
Related