I am attempting to get all of the OUs at the base level of our active directory. I can run this same query in an LDAP Query tool (LDP) and get back an expected low number of results. When I run this query in ColdFusion I return no OUs. However, if I run this same query with a scope of subtree I return every OU in our directory. Any thoughts on what is causing this to occur?
Code:
<cfldap
server="network.mycompany.com"
port="389"
username="userName"
password="password"
action="query"
name="results2"
attributes="canonicalName,OU,DN,name,objectClass,description"
start="DC=network,DC=mycompany,DC=com"
filter="(OU=*)"
scope="base"
sortcontrol="asc">