AnsweredAssumed Answered

Not able to get OU list using JNDI

Question asked by chandan44 on Apr 20, 2017
Latest reply on Apr 20, 2017 by Hitesh_Patel

I am trying to get  OU list from CA directory using following code but not successful, returning blank list.
Can anyone confirm that used filter is correct, same is working in case of MS AD.

 

context = new InitialDirContext(env);

parentDN="ldap://192.168.35.53:10389/dc=eco,dc=com/";

filter="ObjectClass=OrganizationalUnit";

    SearchControls srchCtrls = new SearchControls();
    srchCtrls.setReturningObjFlag(true);
    srchCtrls.setSearchScope(SearchControls.SUBTREE_SCOPE);

nameList=context.search(parentDN, filter, srchCtrls);

 

Checked with following filters also
ObjectClass=groupOfUniqueNames // For Group list
ObjectClass=group

 

Regards,

Outcomes