RE: List groups that a user belong using AD

From: Brian Brown (BrianBrown_at_discussions.microsoft.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 06:45:10 -0800

Gonçalo,

If you are using AD you can use the System.DirectoryServices namspace to
find this information. It is comprised of two classes DirectoryEntry and
DirectorySearcher.
You should be able to instantiate a DirectorySearcher to query for your
information by passing it a DirectoryEntry object. You should be able to
find any information that you would like in AD using these objects.

Hope this helps.



Relevant Pages

  • Re: How to get domainusername (NT account) from a DirectoryEntry object of user?
    ... Call LogonUser with the the userPrincipalName of the user (easily available ... > I have DirectoryEntry object for a user (using the LDAP provider and ... > to export a wrapper on top of activeds.dll and use the name translate COM ...
    (microsoft.public.dotnet.security)
  • Re: Again! Help! I cant connect to Active Directory!
    ... Explicit login and password in DirectoryEntry object did not work for me, ... > two connections using different credentials. ...
    (microsoft.public.dotnet.general)
  • DirectoryEntry Pooling...
    ... some data from Sun One Directories. ... Which kind of pooling do I need to use (connection pooling / object ... Is there any way to pool the directoryentry object. ...
    (microsoft.public.dotnet.languages.csharp)