LDAP OU Definition Filter

angiejones
Tera Contributor

I need to query a specific group in AD and return the members of that group. I have created an LDAP OU Definition with the following fields:

RDN: OU=Users

Query field: sAMAccountName

Filter: (&(memberOf=CN=mygroup,OU=UCAMS Managed Groups,OU=Groups,OU=Enterprise,DC=mydomain,DC=com)(objectClass=group))

The error I receive is "There is no entry returned. Check if Filter is set correctly.".

I created a workflow and used the Query AD and the filter that worked was:

"LDAP://ornl.gov/CN=mygroup,OU=UCAMS Managed Groups,OU=Groups,OU=Enterprise,DC=mydomain,DC=com"

I thought I could use the same in the OU Definition but it did not work. I can query through a workflow but would like to learn how to get the same results outside of a workflow.

Any help is appreciated!

Thanks.

10 REPLIES 10

patrickdeca
ServiceNow Employee

Angie,


Have you tried to query with just using the sAMAccountName name of group within your filter?


Hi Patrick,



I tried cn=mygrounpname by itself but that didn't work either. Is this what you mean?



Thanks!


Angie


patrickdeca
ServiceNow Employee

Hi Angie,



Try (&(objectClass=group)(sAMAccountName=<group name here>))


patrickdeca
ServiceNow Employee

Hi Angie,



Just noticed something, you have RDN: OU=Users.   Are the groups under that OU or something different? That would be your problem.