maloriopolium
asked on
LDAP query
Hi,
I was wondering how to formulate an ldap query that would return all users and their manager's phone number attribute.
Currently I have the Filter set as (objectclass=user) which just returns every user in the organization.
Each user has an attribute "manager" which has their manager's Distinguished Name eg: CN=Manager's Name,OU=Staff,OU=Users,OU= CompanyNam e,DC=XXX,D C=local
Each user also has an attribute "homePhone" which has the phone number
So how do I say give me the user + query the user's manager and only give me the managers homePhone attribute?
Thanks.
I was wondering how to formulate an ldap query that would return all users and their manager's phone number attribute.
Currently I have the Filter set as (objectclass=user) which just returns every user in the organization.
Each user has an attribute "manager" which has their manager's Distinguished Name eg: CN=Manager's Name,OU=Staff,OU=Users,OU=
Each user also has an attribute "homePhone" which has the phone number
So how do I say give me the user + query the user's manager and only give me the managers homePhone attribute?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks PaciB. Yes interrogating the Dictionary object makes more sense for efficiency.
ASKER
Thanks for your reply. I forgot to add that I am trying to do this programmatically in .NET. So based on what you have said, would I need to do another sub query? So basically, I iterate through each user, and for each user, I do another ldap query filtering on the manager's DN and then get back the homePhone attribute?