jsumners / 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. Originally forked from gheeres/node-activedirectory.
MIT License
52 stars 40 forks source link

Setting 'scope' in opts does not work #101

Open tprebenda opened 11 months ago

tprebenda commented 11 months ago

I am trying to specify scope = 'one' to prevent my queries from recursively searching subgroups, so I have tried using the following opts:

const opts = { scope: 'one' as const, // need to declare as const or the request fails... };

When I run getUsersForGroup with the provided opts, however, it returns the same list of users as when I don't provide these opts (all users of all subgroups, recursively searched).

I need to only retrieve the first level of users/groups for a given query, I don't want to recursively search all subgroups.

Can anyone help?

jsumners commented 11 months ago

Would you like to send a Pull Request to address this issue? Remember to add unit tests.