File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to get users info belongs to AD server group. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to get users info belongs to AD server group." Watch "How to get users info belongs to AD server group." New topic
Author

How to get users info belongs to AD server group.

satish kinikiri
Greenhorn

Joined: Nov 16, 2010
Posts: 5
Hi

I need to get list of users(basically list of email addresses of users) who are members of AD group
Please help with sample Java program to list all the user info below to group

My AD sever has a group with name "MyGroup" and has two members "user1" and "user2" can I able to read the email ids of the user1 and user2 by querying AD sever with group name MyGroup

Thanks in advance

Satish
satish kinikiri
Greenhorn

Joined: Nov 16, 2010
Posts: 5
Anybody has an idea about this.
Please help
Stuart A. Burkett
Ranch Hand

Joined: May 30, 2012
Posts: 679
AD has an LDAP interface to it, so that is probably the easiest way to do it. If you haven't used LDAP through Java before, this is probably a good place to start.

The alternative is to write the code that accesses AD in C/C++ and then write a JNI wrapper around that code. This is definitely the less easy option but will give you greater flexibility when accessing AD.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

As Stuart said, you will have to use LDAP searchfilters.

Here is a snippet that requires a previous bind to the AD server, searches and returns attributes.


WP

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get users info belongs to AD server group.