LDAP query to get all users from multiple OUs

Home Forums Microsoft Networking and Management Services Active Directory LDAP query to get all users from multiple OUs

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    jonspurs
    Member
    #154579

    Hi Everyone,
    I’m new to LDAP querying and have googled for an answer but nothing.
    Basically, I have OUs of with users within each year (and every year a new OU is added):
    -Year
    –2008
    —TempStaff
    –2009
    —TempStaff
    –2010
    —TempStaff
    –Test
    –Sample

    Now I can return all OUs with a 2 in it:
    (&(objectclass=organizationalunit)(ou=2*))

    But I’m trying to pull out users who are in OUs beginning with 2 and also in TempStaff. All I have is (objectclass=user) which returns everyone – how would I incorporate (&(objectclass=organizationalunit)(ou=2*)) with this query?

    Thanks for your time and help,

    Jon

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.