public bool IsCurrentUserExistInSPGroup(ClientContext ctx, string groupName)
{
Web web = ctx.Web;
ctx.Load(web.CurrentUser.Groups);
ctx.ExecuteQuery();
GroupCollection groups = web.CurrentUser.Groups;
foreach(Group group in groups)
{
if (group.Title == groupName)
{
return true;
}
}
return false;
}This code snippet for using CSOM Check current logged in user is exist in perticular some Sharepoint group.
