The accepts syntax, in addition to the RFC 3673, RFC 4511, and RFC 4529 standards, that allows you to exclude attributes from search results.
Prefix the attribute name with either
"^"
or
"!"
The following example returns organizational units (OUs) that are part of the
object class group
in Colorado with the exception of OUs in
Denver.
(&(objectClass=group)(&(ou:dn:=Colorado)(!(ou:dn:=Denver))))
The following example returns all users that aren't
device
.
(&(objectClass=user)(!(objectClass=device)))
Note:
To exclude all attributes associated with an object class, prefix the
object class name with either "^@"
or
"!@"
.