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
Yes. That just checks the current user against a group. Don't quite see
what you're trying to do though and what you mean by "any user is in a
group?" You're after a count of the number of members? Probably worth a
repost with more detail about what you're trying to do.