How to retrieve AD Group Name List? RRS feed

  • Question

  • User-1863676999 posted

    Dear all,

    Same as the title, I would like to retrieve the list of all group name from the AD to fullfil my task on writing a program.

    I've found on the source on Internet for more than 1 day. It seems do not have any exactly source related to my task.

    For my task, I need to retrieve the list of ad group name and then add them to the database. Through AD, it can be done by searching GROUP > NAME / DISPLAYNAME

    I believe that it would be (objectclass=group) on coding. But for the query criteria, I'm not sure what I should put on it such as cn, displayname, etc.


    Please help me, it seems that this forum will have someone who can help me! Thanks a lot!

    Wednesday, April 18, 2007 11:16 PM

All replies

  • User-319574463 posted
    Have look at beavertail at http://adsi.mvps.org/adsi/csharp/beavertail.html That will help you to navaigate the AD tree
    Thursday, April 19, 2007 1:37 AM
  • User-1863676999 posted

    Dear Sir,

    I've seen the articles. But, is it just same as how I get mail list from AD? I know the way to get the mail list from AD.

    CN = name, Objectclass= group. Am I missed anything? On retrieving email, I need to have (mailnickname=*)

    Should I have tokenGroup=*, like this?

    It's too confused as I'm not quite familiar with AD structure using with coding.


    Thanks for your fast reply!


    Friday, April 20, 2007 4:22 AM
  • User-319574463 posted

    Examine your AD tree with beavertail and see if you can work out where the mailnickname is being stored.

    Have a look at the following:




    Friday, April 20, 2007 12:22 PM