Hi guys, I am trying to connect to AD and want to be able to enter a group name and return all the members of that group.

I have no idea what I am doing or where to start.

I imagine that its not a lot of code I am looking for, am trying to build a tool for my service desk to use.

Any pointers in the right direction would be awesome.

Recommended Answers

All 2 Replies

It is not difficult, though a little finicky as you have to use the DirectoryEntry and/or DirectorySearcher objects.

here is the official guide: http://msdn.microsoft.com/en-us/library/ms180906(v=vs.80).aspx

And some other examples to get you started;

http://www.daniweb.com/software-development/csharp/threads/339418/active-directory-search-filter-syntax-help

http://stackoverflow.com/questions/7915145/get-all-users-from-a-group-in-active-directory

Awesome thanks, between this and other google help I found eveything I need. Works mint.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.