Security Group

  • Thread starter Thread starter Dagoberto Aceves
  • Start date Start date
D

Dagoberto Aceves

Could anybody here help me find a way to pull the security group name of
the current user?

I've been looking in System.Security.Principal

and have looked at Windows Indentity and such, but i can't seem to be
able to find the Security Group name.

Any help would be greatly appreciated!
Thanks
Dago
 
Hi Dago,

Try This:

Private Function InGroup(ByVal grp As String) As Boolean
Dim id As WindowsIdentity
id = WindowsIdentity.GetCurrent()
Dim p As New WindowsPrincipal(id)
InGroup = p.IsInRole("YourDomainName\" + grp)
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top