Hi @NikhiBadhe-0141,
You can get all group claims information like this:
protected void Page_Load(object sender, EventArgs e)
{
try
{
// Get the claims
var cp = Page.User as IClaimsPrincipal;
if (cp != null)
{
DataRow dr;
DataTable claimsTable = new DataTable();
claimsTable.Columns.Add("Type", typeof(string));
claimsTable.Columns.Add("Value", typeof(string));
IClaimsIdentity ci = (IClaimsIdentity)cp.Identity;
foreach (Claim c in ci.Claims)
{
dr = claimsTable.NewRow();
dr["Type"] = c.ClaimType.ToString();
dr["Value"] = c.Value.ToString();
claimsTable.Rows.Add(dr);
}
claimsGrid.DataSource = claimsTable;
claimsGrid.DataBind();
}
}
catch (Exception ex)
{
this.Controls.Add(new LiteralControl(ex.Message));
}
}
Read Claims Of A User In SharePoint 2013
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.