We (company XYZ) is a service providers and I am setting up XYZ as a custom app in SFDC (testing in SFDC Developers account). I successfully configured SFDC as Identity Provider, and Company XYZ as service provider. I am able to get XYZ authenticated by SFDC and also query SFDC objects using REST API, configured that too. All is good so far. Now I am trying to get User.LanguageLocaleKey as part of the SAML Token, I looked at the custom attributes on Connected App. I see user details like first name, last name etc., but nothing related to language (LanguageLocaleKey). I am able to query User.LanguageLocaleKey using rest api.

How can I get User.LanguageLocaleKey as part of SAML token? Our requirement is, once user redirected to our site (XYZ), we make use of LanguageLocaleKey to switch XYZ site language (internationalization).


A trigger on create/update events that will write the value of User.LanguageLocaleKey to a custom field on the User object. You can then map an attribute to this custom field in your SAML response.

  • I believe adding a custom field to user object make it available to configure Custom Attributes when setting up a Connected app. Unfortunately I am not a SFDC developer. I will have to approach my client (SFDC user) to setup that. Jun 19 '14 at 22:31

Your Answer

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

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