Which domain groups is a user in?

A console application to determine which groups a user is in: My.User.InitializeWithWindowsUser() Dim identity As System.Security.Principal.WindowsIdentity = TryCast(My.User.CurrentPrincipal.Identity, System.Security.Principal.WindowsIdentity) Debug.WriteLine(identity.Name) For Each group As System.Security.Principal.SecurityIdentifier In identity.Groups() Debug.WriteLine(group.Translate(GetType(System.Security.Principal.NTAccount)), "group") Next

A WordPress.com Website.

Up ↑