Invalid DirectorySearcher comparison in filters

I am trying to find LDAP objects that do not matter in my "manager". What should be the filter string? I try with this to no avail:

"(&(objectClass=user)(objectCategory=person)(manager=NULL))"
+3
source share
1 answer

Try the following:

(&(objectClass=user)(objectCategory=person)(!(manager=*)))

!is the "not" operator, and *is an LDAP wildcard, so any search that does not have a value set for the attribute will be searched above manager.

+6
source

Source: https://habr.com/ru/post/1733134/


All Articles