I am trying to create a LDAP picker custom field to show user's departments. I get it to work but the results are showing non-distinct results and so there are many duplicates. Is there a way I can just filter the results so they do not show duplicates?
My current LDAP query is:
(&(objectCategory=person)(objectClass=user)(department=*))
Search attribute and display attribute are both: department
When I use the preview, the results are showing essentially duplicate departments, which I believe the reason is the query is looking for all users and then displaying their departments.