I have asp.net web app, how to check the current logged in user (client) is in specific Active directory group. Thanks
Try this the following method. Just change it according to your needs...
public List<string> GetGroupNames(string userName)
{
var pc = new PrincipalContext(ContextType.Domain);
var src = UserPrincipal.FindByIdentity(pc, userName).GetGroups(pc);
var result = new List<string>();
src.ToList().ForEach(sr => result.Add(sr.SamAccountName));
return result;
}