Improved Support for SCIM User Language Fields
The System for Cross-domain Identity Management (SCIM) is a standard for automating the exchange of user identity information between identity domains, or IT systems. The specification for this standard provides two fields related to each SCIM userβs language and localization settings.
- locale β Indicates the userβs default language
- preferredLanguage β Indicates the userβs preferred language
A Xurrent person record has the locale field to define a personβs language preference.
The default SCIM User Automation Rule now has improved logic to select the language preference when creating new Xurrent person records from a SCIM user import. To achieve this, two new expressions have been added:
The first checks whether a preferredLanguage value is specified for the SCIM user. If not, the locale value of the SCIM user is picked up:
locale: preferredLanguage then preferredLanguage else locale
The second new expression simply attempts to extract the language and region part:
locale: locale.replace(/^\s*(\w\w)(-\w\w)?.*/,β\1\2β²)
Basically it strips any leading spaces, takes the first two word characters and the regional part, if found.
This works because Xurrentβs REST and SCIM APIs now start by searching for an exact match of the provided string when setting the locale of a person record. If a match is not found, they search for an exact match using only the language part (i.e. the letters before the dash). If that also fails, they search for a locale that starts with the language part. Here are some examples of matches that Xurrentβs APIs might find:
- pl β pl β exact match without regional part
- pt-PT β pt-PT β exact match with regional part
- nl-NL β nl β exact match on language part
- pt-MO β pt-PT β start of language part matches