Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kaua Costa   on Nov 26 In Java Category.

  
Question Answered By: Ana Bradley   on Nov 26

Regarding previouse email I want to list all users from my active directory in a java program. but I dont know what would be the parameter to call list method . i am geting

javax.naming.InvalidNameException

which shows I am not using correct name for my context.
does anybody know about that?
try {
.
.
LdapContext ctx = new InitialLdapContext(env, null);
String filter = "(&(sn=Geisel)(mail=*))";
NamingEnumeration answer = ctx.list("CN=Users", filter, ctls);
.

Share: