AD current user

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

is there a way to use the directory service to get the current user logged
into active directory? thanks
 
Hi Brian,
Since I don't use Active directory, I can't give you a very good answer.

"Security for Microsoft Visual Basic .Net", isbn: 0-7356-1919-0 talks about
getting the user's name and domain from WindowsIdentity.GetCurrent.Name and
using that name to search Active Directory for the roles that user belongs
to. I'm not sure what namespace that comes from, but the code example imports
System.DirectoryServices, System.Threading.Thread and
System.Security.Principal.

hth
Tom
 
thanks that did it! and it works for more then just AD users, system users
also work
 
Back
Top