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.
I am implementing an API to get the full list of all active users from AD. It's still new for me to program, so my logic in this question may be stupid (forgive me ahead).
For started, I tried function findUsers with a simple query as "cn=*", the result returned with 1000 items according to the configuration from AD server. I already tried with paging.pageSize = 2000 but it still returned 1000.
So I tried with another approach: first I get the list of all groups, and for-loop those groups to get the users belong to the group, sum recursively the group users and distinct the final result (just to make sure). I have 2 main functions: getAllGroups() and getUsersForGroups(groupName), and a callback recursive handler to store partial results. Is this a fine implementation??
Luckily, my AD server only has a number which is smaller than 1000, so I get the results which is larger than 1000.
Still, there is one problem that I am facing: The final result of all users was returned differently on every trigger.
@Harekam yes I did. I passed this module and implemented with node-ldapjs. Its document is really well, and you can apply Paging query with exact result
Hi George,
I am implementing an API to get the full list of all active users from AD. It's still new for me to program, so my logic in this question may be stupid (forgive me ahead).
For started, I tried function findUsers with a simple query as "cn=*", the result returned with 1000 items according to the configuration from AD server. I already tried with paging.pageSize = 2000 but it still returned 1000.
So I tried with another approach: first I get the list of all groups, and for-loop those groups to get the users belong to the group, sum recursively the group users and distinct the final result (just to make sure). I have 2 main functions: getAllGroups() and getUsersForGroups(groupName), and a callback recursive handler to store partial results. Is this a fine implementation??
Luckily, my AD server only has a number which is smaller than 1000, so I get the results which is larger than 1000.
Still, there is one problem that I am facing: The final result of all users was returned differently on every trigger.
So, could you gimme some advice for this one?