SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have SharePoint 2010 with Claims Authentication (SAML / AD FS v2). I have made an incoming mapping for UPN, Role, CommonName. I want to show the user's "DisplayName" in the right corner (the Name on the profile or PreferredName on SPUser object), but I can't find any solution for how to map the incoming claims to the SPUser object properties.

share|improve this question

You should just be able to use SPWeb.EnsureUser. It understands claims.

For example (from Tyler Holmes):

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.