How to pass the the language attribute for SAML application in query parameter

Hello,
We have raised a case regarding the multilanguage support for SAML application, and we got response on below case:
Case ID: 176170

This is bit unclear as for SAML application if we pass the ui_locales parameter it throws an error. And as per the auth0 documentation this ui_locales parameter is only supported for OIDC(/authorize).

Is there any substitute for ui_locales parameter for SAML applications or provide your suggestion to achieve the same.

Thanks in advance!!

Hi @anant.d.sharma

Welcome to the Auth0 Community!

Reading through your message, I can confirm that you are correct, ui_locales is only meant for OIDC, as mentioned in our following documentation.

I believe you should be able to utilize the below mapping within a Post-Login Action in order to pass the SAML language attribute:

if (event.user.user_metadata.UI_Language)
{
    api.samlResponse.setAttribute('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/UI_Language', event.user.user_metadata.UI_Language);
}

You will need to make sure the attribute exists within the user_metadata as well and is exactly as in the above code ( no difference in upper case/lowercase, whitespaces etc.)

More information can be found here as well SAML Attribute Mapping in SAML2 AddOn vs. Post-Login Action

Hope this helped!
Gerald

Hi Gerald,

Thank you for your response. As per my understanding the code you provided will add the preferred language stored in Okta user metadata into SAML response. But our requirement is to find a way to display the Universal Login screens for SAML app in different language based on some attribute (similar to ui_locales for OIDC app).
Basically, the ask is if we can control the UI screens for SAML type app for specific languages like if we want to display the login in French what can we pass in the request to get that?