I am new to ldap programming. My aim is to to get the list of all the user ids from a particular group in Active Directory. I am implementing this using page control as the number of user's are large. I am doing this for Active Directory using the win32 LDAP library.
The following is the sequence,
1> Initialise: connect and bind 2> Create your page control
ldap_create_page_control
3> Set the base, filter's and attributes
search base : CN=SSOGroup,CN=Users,DC=MyDomain,DC=local)
CHAR *atribs[] = {"Department", "samAccountName", NULL};
char *filter = "(objectClass=user)";
4> Performed the search using, ldap_search_ext_s
5> Got the result and number of entries found.
6> used ldap_get_dn
to get the DN
7> Check the cookie if there is another page, If yes go and do the same
8> Finalising steps
My question, How can i get the user ids at step 6 instead of DNs?
Will be helpful if you give me some pointers for me to investigate further.
Thanks