Rodrigo Fonseca
Rodrigo Fonseca

Reputation: 31

Cant customize the Verification code message

I’m helping a partner to customize their B2C policy to show a custom message for e-mail verification code. We tried to customize the following parameter on the TrustFrameworkExtension (Attached) but it had no effect:

<LocalizedString ElementType="UxElement"
StringId="ver_info_msg">Verification code has been sent to your inbox.
Please copy it to the input box below.</LocalizedString>\\

What we need to change is the display message for verification code, as shown on the image below:

enter image description here

Could anyone provide some guidance? I tried it different ways and I don´t know If we´re doing something wrong or if it´s a default message that can´t be customized. It´s impacting the partner go-live.

Upvotes: 2

Views: 692

Answers (2)

Rodrigo Fonseca
Rodrigo Fonseca

Reputation: 31

thanks for guidance! the message we were trying to customize has a different StringID. The correct StringID is verification_control_code_sent

Once we fixed it we resolved the issue:

<!--Local account sign-up page Portuguese-->
      <LocalizedResources Id="api.localaccountsignup.pt">
        <LocalizedStrings>
          <LocalizedString ElementType="UxElement" StringId="verification_control_code_sent">Um código de segurança foi enviado para seu e-mail. Mantenha esta janela aberta.</LocalizedString>
      

Upvotes: 1

unknown
unknown

Reputation: 7483

The document shows:

The following are the IDs for a content definition with an ID of api.localaccountsignup or any content definition that starts with api.selfasserted, such as api.selfasserted.profileupdate and api.localaccountpasswordreset.

So you need to make the change in the appropriate “api.xxx” action.

The sample extends Id api.localaccountsignup to api.localaccountsignup.en. And change the value of LocalizedString.

<Localization Enabled="true">
  <SupportedLanguages DefaultLanguage="en" MergeBehavior="ReplaceAll">
    <SupportedLanguage>en</SupportedLanguage>
  </SupportedLanguages>
  <LocalizedResources Id="api.localaccountsignup.en">
    <LocalizedStrings>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_no_retry">Attempt limit exceeded - please check your email for the correct code</LocalizedString>
    </LocalizedStrings>
  </LocalizedResources>
</Localization>

Then you need to change value of ver_info_msg in JSON defaults for built-in policies. For more details, see here.

Navigate to Azure AD B2C -> User flows -> Languages(make sure Enable language customization) -> Configured

enter image description here

enter image description here

Upvotes: 0

Related Questions