I need to get 2 separate results from Active Directory using LDAP filters.
Everyone who directly reports to a manager:
(&(manager=CN=XXXX,OU=IT,OU=STAFF,OU=XYZ,DC=ad,DC=xxxcom))
And another list that is recursive directReports for the same manager:
(&(manager:1.2.840.113556.1.4.1941:=CN=XXXX,OU=IT,OU=STAFF,OU=XYZ,DC=ad,DC=xxxcom))
These both return exactly what we need. BUT, it would be great if I could avoid using a specific person in the filter and base the filter on another attribute instead, such as:
(&(department="IT")(jobDesc="Senior Director"))
We are currently accomplishing this using PHP, but we need to switch to using an application that only takes filters. This application does not allow $result= then putting $result in the filter instead of the manager's CN.
Thanks.