locked
why "(&(objectCategory=person)(objectClass=user)(memberOf=MyGroup))" doesn't work RRS feed

  • Question

  • User-1829411134 posted

    I'm just trying to search the users under MyGroup. why the following query doesn't get back anything?

    "(&(objectCategory=person)(objectClass=user)(memberOf=MyGroup))"  

    I tried the following script and it has no problem to get every users:

    "(&(objectCategory=person)(objectClass=user)(memberOf=*))"

    Any ideas?

    Thanks!

     

    Thursday, November 20, 2008 7:29 PM

All replies

  • User-1254955126 posted

    It's because the memberOf attribute value must be the distinguishedName, not the name of a group.

    For example if you created a group in the organizational unit "Org" trysomething like:

    "(memberOf=CN=GroupName,OU=Org,DC=my,DC=domain,DC=name)"

    Thursday, April 30, 2009 4:16 AM