Changing language after the first page

Mathieu Fortin-Boulay 16 Reputation points
2022-11-11T21:55:42.133+00:00

I have a link in my AD B2C custom HTML template to switch the language from English to French and vice-versa, by changing the ui_locales parameter in the URL and reload the page.

It works well for the first page, but if the user goes into a second page (for example, sign up page accessed from sign in page), when the user clicks on the language switch link, they are brought back to the first page and the language hasn't changed. Plus the switch link doesn't work anymore.

For example:
First page (sign-in):
https://tenant.b2clogin.com/tenant.onmicrosoft.com/b2c_1a_signup_signin/oauth2/v2.0/authorize?client_id=clientid&scope=https%3A%2F%2Ftenant.onmicrosoft.com%2Fd6a635ba-b0e7-46b4-9355-1dcd1cb8deac%2Fobjects.write%20openid%20profile%20offline_access&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fen&client-request-id=request_id&response_mode=fragment&response_type=code&x-client-SKU=msal.js.browser&x-client-VER=2.28.1&client_info=1&code_challenge=challenge&code_challenge_method=S256&nonce=nonce&state=state&ui_locales=en

Second page (sign up):
https://tenant.b2clogin.com/tenant.onmicrosoft.com/B2C_1A_signup_signin/api/CombinedSigninAndSignup/unified?local=signup&csrf_token=token&tx=StateProperties=state&p=B2C_1A_signup_signin

After clicking the language switch link in the sign up page:
https://tenant.b2clogin.com/tenant.onmicrosoft.com/B2C_1A_signup_signin/api/CombinedSigninAndSignup/unified?local=signup&csrf_token=tenant&tx=StateProperties=state&p=B2C_1A_signup_signin&ui_locales=fr (but the page is in English)

Am I missing something or there's no way to accomplish what I want? I'm using custom policies btw.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,757 questions
{count} votes