Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 573 Bytes

ldap-query-search-filter-syntax.md

File metadata and controls

12 lines (9 loc) · 573 Bytes

LDAP query search filter syntax

LDAP (Lightweight Directory Access Protocol) query filter syntax can be found here

I will mention a few useful ones here:

query = "(cn=*bob*)"; //contains 'bob' anywhere in cn
query = "(&(objectClass=user)(email=*))"; //users which have email
query = "(!(email=*))"; //users witout email
query = "(&(objectClass=user)(| (cn=andy*)(cn=steve*)(cn=margaret*)))"; //user entries with a common name that starts with "andy", "steve", or "margaret"