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=CompanyName,DC=XXX,DC=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?