I am facing some difficulties while listing all the users in more than two groups in the Active Directory. I can list the members who are in one group by specifing the OU (ex. IT) and the DC
Here is my code
public static String usersContainer = "ou=USERS,ou=IT,ou=Accounts,ou=HR,ou=AAB,dc=AXA";
If I want to include the account at the same time and they are also ou, how do I do that?
I tried this solution:
ou=USERS,ou=IT,ou=account,dc=XXX,dc=AAA,dc=com
But, it gave me an error that the name is not found. How do I include one more ou at the same level of the first ou
The rest of my code is
ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
NamingEnumeration answer = ctx1.search(usersContainer, "(objectClass=user)", ctls);
Can anyone help