5 Replies Latest reply on Feb 5, 2009 4:12 AM by weggers

    CFLDAP Filter by OU

    weggers
      Hello,

      I have this CFLDAP query that returns all of the users in my AD from every OU but excluding disabled accounts. It works fine...

      However what I would like to do is return all of the users from a particular OU only, i`m sure i need to do this in the filter attribute but I cant figure it out. I have three OU`s. I only want to query the users in my "People" OU. Any ideas how I specify this?

      Here is my code.
      Thanks.

      <cfldap action="QUERY"
      name="results"
      attributes="userPrincipalName,description,physicalDeliveryOfficeName"
      start="dc=domain,dc=com
      scope="SUBTREE"
      filter="(&(objectCategory=user)(userPrincipalName=*)(!(userAccountControl:1.2.840.113556. 1.4.803:=2)))"
      server="server.domain"
      username="********"
      password="********">

      <cfdump var="#results#">