In our big hospital we have Active Directory with about 12000 user accounts and about 100 departments.
I've got a view account that successfully queries the AD.
The maximal number of records I can retrieve from the Ldap has been limited (by default) to 999 so enumerating all 12000 users is not an option. And removing the limit is not permitted and not desired.
What I would like to get from the AD is all the distinct entries in the user field "department".
Is there a "distinct" option in LDAP queries?