C#-APP: Getting user's group using Active Directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • derstuka
    New Member
    • Mar 2008
    • 1

    C#-APP: Getting user's group using Active Directory

    Using 2.0 Framework. I'm new to using System.Director yServices.Activ eDirectory.

    My goal is to find out if the user currently logged on belongs to a certain group. I.e., I am logged on as johndoe, this function might return "Marketing"

    If someone can point me in the right direction or provide a sample, I would really appreciate it. I've googled and scoured microsoft's site to death but I just can't find what I'm looking for.
  • VBWheaties
    New Member
    • Feb 2008
    • 145

    #2
    Originally posted by derstuka
    Using 2.0 Framework. I'm new to using System.Director yServices.Activ eDirectory.

    My goal is to find out if the user currently logged on belongs to a certain group. I.e., I am logged on as johndoe, this function might return "Marketing"

    If someone can point me in the right direction or provide a sample, I would really appreciate it. I've googled and scoured microsoft's site to death but I just can't find what I'm looking for.
    How about this blurb from MicroSoft:

    "[...] System.Director yServices.Activ eDirectory is not used to access data that resides within Active Directory or any other directory service. The System.Director yServices namespace should be used for this purpose."

    In other words: use System.Director yServices to find what you need.

    Heres the link:
    Provides a high level abstraction object model that builds around Microsoft Active Directory services tasks. The Active Directory service concepts such as forest, domain, site, subnet, partition, and schema are part of the object model.
    Last edited by VBWheaties; Mar 14 '08, 07:47 PM. Reason: added link

    Comment

    • balabaster
      Recognized Expert Contributor
      • Mar 2007
      • 798

      #3
      The most useful way I've found of doing this is to use LDAP - check the following thread:

      Comment

      Working...