Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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";
spUser.Update();
share|improve this answer
add comment

Your Answer

 
discard

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