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”) NextWhich domain groups is a user in?

Comments
One response to “Which domain groups is a user in?”
-
Very niice blog you have here
Leave a comment