With some help from this forum, I was able to query Active Directory to get all the groups a particular user belongs to. Now I would like to go the other way i.e. given a (AD security) group, I would like to list all its members.
I used a search filter of (&(objectCategory=group)(cn=My Group)) and attribute member to the DBMS_LDAP.SEARCH_S API and this returns a list of CNs e.g.
CN=Doe\, John,OU=Users,OU=Group4,OU=NY,DC=domain,DC=com
But member is a multi-valued attribute. Instead of parsing the CN string, I would like to retrieve some other key attributes about the user that are stored in custom properties in AD e.g. employeeNumber, employeeID, etc.
Something similar to the PowerShell cmdlet Get-AdGroupMember
Any ideas? Thanks