C
Chris
Hi,
I am using windows integrated authentication aon my intranet. How do I check
if a user is a member of a group in active directory. I have the foll test
code but it's not working
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If User.IsInRole("USA\Administrators") Then
TextBox2.Text = ("Role: Administrator").ToString
Else
TextBox2.Text = ("Unable to check Role").ToString
End If
End Sub
note: usa is name of my domain
I get the second message "Unable to check Role". The Windows Authentication
works great. If i use
TextBox1.Text = User.Identity.Name
I get the correct logged on user. The only problem here is checking the
role/group in active directory.
Thanks
I am using windows integrated authentication aon my intranet. How do I check
if a user is a member of a group in active directory. I have the foll test
code but it's not working
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If User.IsInRole("USA\Administrators") Then
TextBox2.Text = ("Role: Administrator").ToString
Else
TextBox2.Text = ("Unable to check Role").ToString
End If
End Sub
note: usa is name of my domain
I get the second message "Unable to check Role". The Windows Authentication
works great. If i use
TextBox1.Text = User.Identity.Name
I get the correct logged on user. The only problem here is checking the
role/group in active directory.
Thanks