Reputation: 57
I've attached a picture about my LDAP structure (LDAP structure), where I have two users in one group, along with a security group definition. I also have uses, belonging to this security group, but situated in other parts of the AD tree. What is the best strategy to find all users belonging to this security group?
Upvotes: 2
Views: 5527
Reputation: 11056
Assuming you are ONLY using Microsoft Active Directory and the interest is to use an LDAP Search to find all "USERS" belonging to to a Security Group
to retrieve only users that are members:
(&(objectClass=user)(memberof:1.2.840.113556.1.4.1941:=CN=GroupOne,OU=Security Groups,OU=Groups,DC=YOURDOMAIN,DC=NET)
Direct members of a Security Groups
(memberOf=CN=Admin,OU=Security,DC=DOM,DC=NT)
Resolves all members (including nested) Security Groups (requires at least Windows 2003 SP2)
(memberOf:1.2.840.113556.1.4.1941:=CN=GroupOne,OU=Security Groups,OU=Groups,DC=YOURDOMAIN,DC=NET)
We have several more Microsoft Active Directory LDAP Queries for Groups
Upvotes: 2