OpenLDAP filter not returning empty OUs

38 Views Asked by At

I've tried the recommended filter as well as various variations and still, I cannot get a list of the OUs with no child entries.

Search Base: ou=compay,ou=drivers,dc=core,dc=com
Filter: (&(objectClass=organizationalUnit)(!(objectClass=*)))

Running LDAP version 3 of OpenLDAP.

1

There are 1 best solutions below

0
Connie DeCinko On

I was able to solve this by using the following filter:

searchFilter = "(&(objectClass=organizationalUnit)(hasSubordinates=FALSE))"

So far it works great.