cancel
Showing results for 
Search instead for 
Did you mean: 

Traveling down AD OUs, with xMII LDAP Query

Former Member
0 Kudos

Hi,

Now I can get into AD when I run the user list test query:

select sAMAccountName name from cn=Users where objectCategory=user

I get into the basic top level users OU.

I need to get into the OU ProdUsers, as that is where our users are.

OU=ProdUsers,OU=Monterrey,OU=Food,OU=AM,OU=PKG,OU=PROD,DC=Company,DC=biz.

I modified the query tol look like this:

select sAMAccountName name from cn=users, ou=ProdUsers, ou=monterrey, ou=food, ou=am, ou=pkg, ou=Prod where objectCategory=user.

But I am not getting a list of users,

Query test returned the following number of records: 0

and the error is:

javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=ProdUsers,OU=Monterrey,OU=Food,OU=AM,OU=PKG,OU=PROD,DC=Company,DC=biz' ]; remaining name 'cn=users, ou=ProdUsers, ou=monterrey, ou=food, ou=am, ou=pkg, ou=Prod,DC=Company,DC=biz'

From what I found out that this is a groups settings error.

Any idea what that groups setting should look like?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Disregard that post found the problem.

Query does not need a cn=, so it looks like this now and it works

select sAMAccountName name from ou=ProdUsers, ou=monterrey, ou=food, ou=am, ou=pkg, ou=Prod where objectCategory=user

Thanks for looking.