How to get list of user givenname property from an LDAP search for a group?

206 Views Asked by At

I am trying to fetch a list of users (user fullnames) belong to TEST group. The search query I am using is

NamingEnumeration<?> enumeration = ldapCtx.search("ou=staff,o=filenet,dc=test,dc=com", "(cn=TEST_GROUP)", searchCtls);

It returns the group with uniquemembers list containing dn of all users. How do I fetch the fullname for these users ?

Note: I am using Tivoli Directory service. But a generic answer is fine.

1

There are 1 best solutions below

0
Sébastien Helbert On BEST ANSWER

You can't fetch all member's group fullnames in one LDAP request because there's no joins in LDAP. You should load members data individually from their DN to get fullnames.