LDAP query example

Using your LDAP Query tool, create an LDAP query that only returns user members (e.g. no nested groups).

Base DN

ou=freshmen,dc=yourdomain,dc=com

Query examples

  • (cn=*) all

  • (&(cn=*)(!(cn=andy))) all, except andy

  • (&(cn=*)(!(|(cn=andy)(cn=rose)) all, except andy or rose

  • (&(cn=*)(!(memberOf=ou=XYZ,dc=yourdomain,dc=com))) all, except from XYZ

  • (sAMAccountName=youruser) only 1 specific logon name

  • (|(cn=andy)(cn=frank)(cn=amy)) ¬†only these 3 users

  • (&(objectCategory=user)(memberOf=cn=MyCustomGroup,ou=XYZ,dc=subdomain,dc=domain,dc=com)) gets all users under a custom group MyCustomGroup

Read more

Did this answer your question?