(<and/or>(condition1)(condition2)(condition3)(etc))There can also be nested and negated.
(&(objectClass=user)(memberOf=cn=group1,ou=users,dc=test,dc=lab))- Find all objects of type 'user' AND member of 'cn=group1,ou=users,dc=test,dc=lab'
(&(objectClass=user)(cn=*admin*))- Find all objects of type 'user' AND with 'admin' somewhere in their common name.
(|(objectClass=user)(objectClass=computer))- Find all objects of type ‘user’ OR type 'computer'.
(anr=<name string)- This works only with Active Directory!
(&(objectClass=user)(memberOf=cn=group1,ou=users,dc=test,dc=lab)(!(sAMAccountName=testuser)))- Note the extra parentheses! (!(sAMAccountName=testuser)).
(&(objectClass=user)(memberOf=cn=group1,ou=users,dc=test,dc=lab)(|(cn=*svc*)(cn=*service*)))- Find all objects of type 'user' AND member of group1 AND (*svc* OR *service*) in their name.
(&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=cn=group1,ou=users,dc=test,dc=lab)- Find all objects of type ‘user’ AND member of group1 or member of a group which is itself a member of group1
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.