File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query for "ACTIVE" users in LDAP server NOT working

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to be able to get via querying the active directory using the LDAP server a list of defined "ACTIVE" users from the active directory using the accountExpires attribute.

I have tried to do this via a successful connection to my ldap server. In the java code below I get back ONLY 1 record when using the accountExpires attribute. I should get back a list of records with each record displaying the DISPLAY NAME and MAIL attribute from the ldap server.

I'm sure it's something stupid I'm NOT doing.

ANY help/direction would be appreciated. Regards.

Here is my code:

 
Paul Clapham
Sheriff
Pie
Posts: 20171
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered using a while-loop to process all the entries in the NamingEnumeration, instead of just processing the first entry?
 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. I knew I was doing something stupid. I appreciate the help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic