Click here to Skip to main content
15,891,993 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to show all user detail from active directory.

DirectoryEntry entry = new DirectoryEntry();
entry.Path = "LDAP://domain.co.in";
DirectorySearcher mySearcher = new DirectorySearcher(entry);
string Name = "amit_ghorpade";
mySearcher.Filter = ("(anr=" + Name + ")");
foreach (SearchResult result in mySearcher.FindAll())
{
//Response.Write(result.GetDirectoryEntry().Path);
Response.Write(result.GetDirectoryEntry().Parent.Name);
Response.Write("      ");
Response.Write(result.GetDirectoryEntry().Name);
Response.Write("

");
}


I have used this code for show user by search facility.

but I want to show user detail by separate group.

i.e User will provide group name and code will return all user under this group.

Thanks in advance.
Posted
Comments
ZurdoDev 24-Apr-13 8:02am    
I don't know what it is offhand but you just need to change your LDAP query.

1 solution

I want this user list by particular group i.e. IT department

What and how changes it will need to do this code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900