Active Directory Group Related Searches

Overview #

These are Examples for Active Directory Groups related LDAP SearchFilters which show LDAP Query Examples that can be used to find information specific to Active Directory Groups.

More LDAP Query Examples and more AD Specific LDAP Query Examples

All groups #


Security Groups #

Direct members of a Security Groups #


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) 

Or 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) 
For information on why this Extensible Match rule works see 1.2.840.113556.1.4.1941 or LDAP_MATCHING_RULE_IN_CHAIN

All Security Groups (local, global and universal) #

For information on why this works see How To use Filtering for Bit Fields and 1.2.840.113556.1.4.803 or LDAP_MATCHING_RULE_BIT_AND

All empty groups: #


All Security Groups with a groupType of Global #


All Security Groups with groupType of Domain Local #


All Security Groups with a groupType of Universal #


Distribution Groups#

All Distribution Groups#


All Distribution Groups with groupType of Global #


All Distribution Groups with type of Domain Local: #


All Distribution Groups with type of Universal #


All groups which were changed since Dec 31 2008: #


More Information #

There might be more information for this subject on one of the following:

The handy search I found is:

(member:1.2.840.113556.1.4.1941:=CN=John Smith,DC=MyDomain,DC=NET)

Where CN=John Smith,DC=MyDomain,DC=NET is the user's FDN and 1.2.840.113556.1.4.1941 is the special OID Rule ID LDAP_MATCHING_RULE_IN_CHAIN as you used above (and is documented here.

--scott, 02-Apr-2012 21:48