Skip to main content
Skip table of contents

Azure AD: How to map "preferredLanguage" attribute through another attribute

If you are not able to fill in "preferredLanguage" via a default method, you can use the “switch” expression to exchange a finite list of elements to languages. For example, you could use the country or a specific address and exchange it for our language codes (see list below for the correct language codes). 

To make this work, you need a list that tells the system which element should be exchanged with which language value.
Please follow the steps below:

  • Go to Azure Attribute Mapping

  • Then add a new attribute 

  • Fill in the fields as follows and click on "Save"

rtaImage.png

Detailed explanation:

Mapping Type: Expression 
Expression: Switch([Sourceattribute], "DefaultValue", "Source1", "Target1", "Source2", "Target2", [...]) 
Sourceattribute: attribute that is maintained throughout (country, postal code, usageLocation, etc.) 
DefaultValue: default value for any attribute not mentioned in the list (recommended: de or en) 
Source1: first item to be exchanged (e.g., AT; DE; UK etc) 
Target1: first exchange (e.g., de, en etc.) 
Source2: second item to be exchanged 
Target2: second exchange
Target attribute: should be preferredLanguage 

All users with source entries that are not featured in the list will receive the default value. 

Note:
The expression is case sensitive! For example, if you use both “DE” and “de”, you need to include both versions in the function (“DE”, “de”, “de”, “de”). 

Microsoft limits this expression to 100 values. 
 

Microsoft article for further information: 

https://learn.microsoft.com/en-us/azure/active-directory/app-provisioning/functions-for-customizing-application-data#switch  
 

What language syntax do we accept? 

We accept ISO 639-1 language codes.  The combinations like de-DE and en-US with ISO-639 and ISO-3166 also work.  

Full list of acceptable language codes: 

  • ar: 'Arabic'

  • zh: 'Chinese'

  • de: 'German'

  • en: 'English'

  • es: 'Spanish'

  • fr: 'French'

  • it: 'Italian'

  • nl: 'Dutch'

  • pl: 'Polish'

  • pt: 'Portuguese'

  • ru: 'Russian'

  • se: 'Swedish'

  • tr: 'Turkish'

  • jp: 'Japanese'

  • da: 'Danish'

  • cs: 'Czech'

  • hu: 'Hungarian'

  • ro: 'Romanian'

  • sk: 'Slovak'

  • fi: 'Finnish'

  • et: 'Estonian'

  • el: 'Greek'

  • no: 'Norwegian'

  • bg: 'Bulgarian'

  • vi: 'Vietnamese'

  • sl: 'Slovenian'

  • hr: 'Croatian'

  • ko: 'Korean'

  • hi: 'Hindi' 

  • th: 'Thai' 

  • uk: 'Ukrainian' 

  

Please keep in mind
Accepting that data is not the same as supporting all languages in the list (in terms of content). 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.