public void GetClaims()
{
System.Security.Principal.IPrincipal ipl = System.Web.HttpContext.Current.User;
System.Security.Claims.ClaimsIdentity claimsIdentity = (System.Security.Claims.ClaimsIdentity)ipl.Identity;
foreach (System.Security.Claims.Claim oClaim in claimsIdentity.Claims)
{
Response.Write("ClaimType [" + oClaim.Type.ToLower() + "] has value [" + oClaim.Value + "]");
}
}
Wednesday, October 1, 2014
Get Claims Programmatically
And that's how you get all the claims for a user programmatically in .NET. Almost similar to my older post:
Subscribe to:
Post Comments (Atom)
-
Scenario: Updating the Master Page for SharePoint Online is not recommended by Microsoft now.....fine. So how do we change the UI then? And...
-
Microsoft introduced Office Graph a couple of months back which uses machine learning techniques to connect people to the relevant content,...
-
I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...
Official SharePoint Documentation
I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...
No comments:
Post a Comment