Copy link to clipboard
Copied
Hello ppl, it's been a very long time since i last posted here, ne way, i hope i can get some help from you guys.
This time i'm posting here because i'm having some issues with cfldap.
So far i have this:
<cfldap username="some_user"
password="some_password"
server="dc.mynetwork.com"
action="query"
name="LdapAreaQuery"
start="dc=mynetwork,dc=com"
filter="(&(objectclass=organizationalunit)(!(|(name=computers)(name=groups)(name=servers))))"
attributes="ou"
sort="ou"
timeout="20000">
<cfquery name="FilterLDAP" dbtype="query">
SELECT DISTINCT(ou)
FROM LdapAreaQuery
</cfquery>
So far i'm using FilterLDAP to populate a cfselect (used as a filter) with all the Organizational Units that are not computers, groups or servers, the thing is that i'm getting this cfselect populated with sub-ou, for example: OU=Support,OU=IT,DC=mynetwork,dc=com the thing is that i ONLY need the 1st level of the OU not the whole thing (what i need is OU=IT,DC=mynetwork,dc=com)
TY in advance!
Copy link to clipboard
Copied
First suggestion. Make your start more specific. If you only want "OU-IT,DC=mynetwork,DC=com". Put all that in your start parameter.
Secondly play with the scope parameter which can have the following parameters,: