I am using the following code to do LDAP authentication
PrincipalContext _loginContext = new PrincipalContext(ContextType.Domain, "mydomain.com");
_isAuthSuccess = _loginContext.ValidateCredentials(myUserName, myPassword);
if (_isAuthSuccess)
{
//assume the validation is OK
}
This code is working fine and i am able to decide the user is authenticated or not.
But now i have to find the user belongs to a particular user group (active directory user group ) and if its , then only allow login . So how can i find the user belongs to what all groups in C#