Results 1 to 5 of 5

Thread: LDAP Query for memeber of one group

  1. #1
    Join Date
    Mar 2009
    Location
    Bucharest
    Posts
    2

    LDAP Query for memeber of one group

    Hello,

    I'm trying to set a saved query that will return the members of on group.
    So I've created the follwing query to get all the users which are member of the group Internet from the domain mydomain.local in the OU Bucharest

    (&(&(objectCategory=person)(|(objectClass=contact)(objectClass=user))(memberOf=cn=Internet,ou=Buchar est,dc=mydomain,dc=local)))

    But I get nothing.
    Some help...

    Thanks.
    Victor.

  2. #2
    Join Date
    Sep 2004
    Posts
    82

    Re: LDAP Query for memeber of one group

    As per my experience it sounds like you want users and contacts that are direct member of the group. If yes, then try out this:

    (&(objectCategory=person)(memberOf=cn=Internet,ou=Bucharest,dc=mydomain,dc=local))
    Here the clause (objectCategory=person) will return user and contact objects. Hope it helps.

  3. #3
    Join Date
    Jun 2006
    Posts
    206

    Re: LDAP Query for memeber of one group

    Did you check whether your Distinguished Name (DN) is correct? Because to me it seems wrong and hence all those problems are coming up.

    Just go to ADSIEdit and recheck DN you have in your script matches the actually defined DN of the object. Let me know the result.

  4. #4
    Join Date
    Mar 2009
    Location
    Bucharest
    Posts
    2
    OK, so I've installed ADSIEdit and after I got all correct DN's I came up with this:

    (&(objectCategory=person)(memberOf=CN=Internet,CN=Users,DC=mydomain,DC=local))

    ..and it works I've got al lthe members of the group Internet.

    But this users are spread in more then 50 OU's. How can I add a condition to narrow down to the users that are members of the group Internet but under a specific OU?

    I've tried this but it dose not work:

    (&(&(objectCategory=person)(memberOf=CN=Internet,CN=Users,DC=mydomain,DC=local)(OU=Bucharest,OU=Coun try,OU=Company,OU=Organisation,DC=mydomain,DC=local)))

    I had run into the exact same issue yesterday, but as Richard said it is not
    possible.Please no e-mails, any questions should be posted in the NewsGroup This posting is provided "AS IS" with no warranties, and confers no rights.
    try to use LDAP query:

    (&(objectCategory=person)(memberOf=CN=Internet,CN= Users,DC=mydomain,DC=local))

  5. #5
    Join Date
    Nov 2009
    Posts
    1

    Re: LDAP Query for memeber of one group

    I'm having a similar issue, except I'm attempting to pull ALL users from AD except the ones in a specific group.

    (&(objectCategory=Person)(objectClass=User)(!memberOf=CN=GroupToExclude,CN=General,CN=Security Groups,OU=*corporate,OU=base,DC=domain,DC=com))

    I did up a quick LDAP query test and found that I'm able to pull out or filter users with the following:

    (&(objectCategory=Person)(objectClass=User)(memberOf=CN=TestSharepointGroup,CN=Users,DC=domain,DC=co m))
    (&(objectCategory=Person)(objectClass=User)(memberOf=CN=Alberta Region,CN=Region Distribution List,CN=Email Distribution,OU=base,DC=domain,DC=com))

    I picked a different group with in the same container as the problem group and found this DOES NOT work:

    (&(objectCategory=Person)(objectClass=User)(memberOf=CN=differnetGroup,CN=General,CN=Security Groups,OU=*corporate,OU=base,DC=domain,DC=com))

    Can anyone point to any issue with the query, or a possible issue with a ldap query to nested OUs?

Similar Threads

  1. LDAP query to speficied LDAP server on TCP port 389 failed
    By Shash in forum Windows Server Help
    Replies: 2
    Last Post: 02-05-2012, 05:01 PM
  2. need LDAP query to capture nested group ?
    By vivekmohan in forum Active Directory
    Replies: 4
    Last Post: 25-06-2009, 12:10 AM
  3. LDAP query
    By Palaksi in forum Active Directory
    Replies: 3
    Last Post: 11-12-2008, 02:09 AM
  4. LDAP query can it be done ?
    By zscw1 in forum Active Directory
    Replies: 3
    Last Post: 13-11-2008, 10:08 AM
  5. ldap query for group members
    By Billie in forum Active Directory
    Replies: 1
    Last Post: 23-02-2008, 07:11 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,626,534.33047 seconds with 17 queries