One of the new requirements for our database application is to synchronize the contents of the user table with users in Active Directory. So basically I need to connect to the Active Directory server and get a list of usernames from the plsql procedure.
What I have achieved so far is connecting to an active directory server, using my own credentials, and requesting some attributes.
Example:
ldap_password := '****';
ldap_user := 'cn=me,OU=Users,OU=mygroup,DC=mytown,DC=mycompany,DC=com';
ldap_base := 'OU=Users,OU=mygroup,DC=mytown,DC=mycompany,DC=com';
search_filter := '(&(objectClass=Person)!((sn=him)(cn=me)))';
res_attrs(1) := 'displayName';
res_attrs(2) := 'cn';
res_attrs(3) := 'telephoneNumber';
It seems I can only request my own attributes or someone else if I already know who it is someone else.
- How to get a list of usernames?
- Is this possible with any account or does it require an account with the appropriate privileges?