NodeSSPI icon indicating copy to clipboard operation
NodeSSPI copied to clipboard

Filter usergroups

Open andhure opened this issue 8 years ago • 5 comments

Hello,

Is there way to filter the usergroups so that only required usergroup is received? For example, if I want usergroups of a user that contains "ABC_", can I provide some options to retrieve only those? Right now, it has to be retrieved and filtered and it can cause performance issues if large groups are present and there are frequent calls?

Regards Ajith

andhure avatar Mar 07 '16 08:03 andhure

We are seeing similar issues right now for users with membership to many groups. It looks like each group is being looked up which is resulting in our app effectively DoS'ing our domain controller. Is there any work around that can be done at the application level, or is our best bet to issue a LDAP query directly instead of leveraging "retrieveGroups"?

Thank you

RyanHirsch avatar Aug 17 '16 16:08 RyanHirsch

I haven't found a suitable win api that accepts group filters. Even though I can do a post-retrieval filter in NodeSSPI, I don't think it helps solving your problem so yes, the best bet for now is disabling retrieveGroups and installing a LDAP module to filter.

abbr avatar Aug 18 '16 04:08 abbr

@abbr How to use LDAP module? Could you please give a demo?

Thanks!

happykmm avatar Sep 14 '16 08:09 happykmm

@suro1995 , I haven't tried but take a look at node-activedirectory

abbr avatar Sep 18 '16 03:09 abbr

@abbr Thanks for providing the module so much! I also found out an alternative way using powershell: https://technet.microsoft.com/en-us/library/ee617193.aspx

happykmm avatar Sep 18 '16 12:09 happykmm