Last post Sep 30, 2011 12:34 AM by kushal.dwivedi
Sep 29, 2011 02:47 PM|Thailog001|LINK
I read about and I followed a link I found here.
I have it working correctly (I think) because it will say
You were authenticated using LdapAuthentication.
but I want to only let certain AD group member ships (TimeCallAppUsers) into the application. I read on the support page that the code does call the
LdapAuthentication.GetGroups method but I don't know how to tell it to authenticate
and allow only those in the group TimeCallAppUsers.
Can anyone please, please, please help me?
Sep 30, 2011 12:34 AM|kushal.dwivedi|LINK
As per the mentioned article, following line will give you all the groups (in groups string variable )the current user is member of. just check if your group name(TimeCallAppUsers) is there in the string. If it is not there in the string, user is not member
of that group and you can return false otherwise proceed with rest of the method call (i.e. creating ookie and all the stuff)
if(true == adAuth.IsAuthenticated(txtDomain.Text, txtUsername.Text, txtPassword.Text))
String groups = adAuth.GetGroups();