• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfldap query

New Here ,
Sep 14, 2009 Sep 14, 2009

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!

TOPICS
Advanced techniques

Views

792

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 15, 2009 Sep 15, 2009

Copy link to clipboard

Copied

LATEST

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,:

  • oneLevel: entries one level below entry.
  • base: only the entry.
  • subtree: entry and all levels below it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation