ADSI using DirectoryServices

  • Thread starter Thread starter phineas
  • Start date Start date
P

phineas

Guest
Howdy!

Im trying to get a list of groups a specific user is a member of in an NT domain. At the moment Im trying to do this using ADSI & the Class librarys DirectroyServices namespace.

I can easily get hold of the ADSI user object:
DirectoryEntry user = new DirectoryEntry(@"WinNT://xxx/yyy,user")

where xxx is the domain & yyy is the username, but how do I invoke the ADSI method IADsUser::Groups.

It would seem to be something like
user.Invoke("Groups", new object[] {xxxx});

Its the xxx thats the problem.. how do I provide an argument for the ADSI method to return a IADsMembers collection of groups in?

Ta
 
Back
Top