Enumerate AD groups

  • Thread starter Ray Cassick \(Home\)
  • Start date
R

Ray Cassick \(Home\)

Can anyone point the way to some code I can use to get a listing of all the
groups in AD?

I am writing an application that is setting some access rights and before it
goes about it business I want to have the app check to make sure that the
groups it will be using are actually present. I have code that enumerates
the groups that belong to a specific user but nothing that will actually
just give me a listing of available groups.



--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-7537
Blog: http://spaces.msn.com/members/rcassick/
 
L

Leon Mayne [MVP]

Ray said:
I am writing an application that is setting some access rights and
before it goes about it business I want to have the app check to make
sure that the groups it will be using are actually present. I have
code that enumerates the groups that belong to a specific user but
nothing that will actually just give me a listing of available groups.

Depends on how your AD is setup. If you have it set up so your groups are
listed under e.g. OU=Groups,DC=yourdomain,DC=com then you should just be
able to loop through the contents of that OU and get the CNs of all the
groups underneath it.

There's some code at http://www.codeproject.com/dotnet/ActiveDONavigator.asp
which might help with looping through the groups.
 
G

Guest

Why do you and Cor call your web site "DataGrid Help" when there is so much
more that you guys have put on the site? Shouldn't it read something like
VB.HELP
 
K

Ken Tucker [MVP]

Hi,

It started off as a place to post datagrid tips because the
syncfusion website was having issues then. It kind of grew from there.

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top