1

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.

3

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();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy