Is it possible to read claims by using the SPUser object only? STS is used as claimsprovider.

All examples I have found use: var claimsPrincipal = Page.User as IClaimsPrincipal; claimsIdentity = (IClaimsIdentity)claimsPrincipal.Identity;

But I need the claims of any spuser not just the current.

I have verified that the FillMethod in the claimsprovider trigges by runnung EnsureUser() but I can't find a way to get hold of the users claims.

Is it possible?


3 Answers 3


Ultimately the claims are created from a source outside of Sharepoint, and the user must authenticate through that source to get their claims assigned. Sharepoint can't get the claims for users who are not currently logged in, because it can't authenticate to the STS as that user and the claims the STS gives the user could change.

  • Thank you for all replies! I have come to the same conclusion. The only claim accessible is the identity or login name. But it's strange that the EnsureUser() method on a SPWeb will trigger claims Fill metods on the STS.
    – moregardh
    Oct 2, 2012 at 16:58

have you looked at this?

SPUser spUser = web.EnsureUser(string.Format("i:0#.f|providerName|{0}", fbaUser.UserName)); spUser.Name = "FriendlyName"; spUser.Update();

How to map Claims to SPUser object?

hope it helps :)


Maybe this could be useful:

SPUser user = ...;
SPClaim claim = SPClaimProviderManager.Local.ConvertSPUserToClaim(user);
  • That will provide the single identity claim for that user, and not the full claim set. There are also bugs when using this through ADFS as noted in the comments on the MSDN page
    – lgaud
    Oct 2, 2012 at 15:15
  • What IS the correct method and what does return the full claim set Igaud?
    – Dennis G
    Feb 27, 2015 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.