I noticed that I can make query with wildcards in LDAP. For example:
1.
ldapConnectionPool.search(baseDn, SearchScope.SUB, "objectSid=*")
and this search request will response all entries which has objectSid
2.
And this query will return all entries without objectSid
ldapConnectionPool.search(baseDn, SearchScope.SUB, "!(objectSid=*)")
I would like to search entry by PrimaryGroupToken so I tried to execute:
ldapConnectionPool.search(baseDn, SearchScope.SUB, "objectSid=*512")
and
ldapConnectionPool.search(baseDn, SearchScope.SUB, "objectSid=*-512")
But I receive empty resut although there are an entry in Ldap:
Is there way to avoid it ?