AAD B2C Localization. Error while uploading custom policy

Syed Palayathar 486 Reputation points
2021-08-03T11:12:52.787+00:00

Hello Experts,

Could you help?

I am trying to localize string values by changing default values in UX. I am trying to do the following, i.e.

  1. Create a localized string for StringId "ver_intro_msg" to "Please verify your email address"
  2. Create a localized string for StringId "button_continue" to "continue"
  3. Create a localized string for StringId button "ver_but_send" to "Send verification code to email"
  4. Create a localized string for StringId "success_send_code_msg" to "Verification code has been sent to your inbox. Please enter code below."

I get an error when I tried to upload that policy to B2C custom policy

Error:

Validation failed: 3 validation error(s) found in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant "xxxxxxxx.onmicrosoft.com".The localized string with ElementType: UxElement and StringId: ver_intro_msg has an invalid StringIdThe localized string with ElementType: UxElement and StringId: button_continue has an invalid StringIdThe localized string with ElementType: UxElement and StringId: ver_but_send has an invalid StringIdThe localized string with ElementType: UxElement and StringId: ver_intro_msg has an invalid StringIdThe localized string with ElementType: UxElement and StringId: button_continue has an invalid StringIdThe localized string with ElementType: UxElement and StringId: ver_but_send has an invalid StringId

\

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Syed Palayathar 486 Reputation points
    2021-08-04T16:04:09.353+00:00

    Thanks for your effort @James Hamil . Appreciate it.

    It seems that the stringId that I used in the above snippets is not for api.signuporsignin but it should be used in conjunction with api.selfasserted. This information was hidden here
    I changed this to the following and it worked :)

        <LocalizedResources Id="api.selfasserted.en">  
        <LocalizedStrings>  
          <LocalizedString ElementType="UxElement" StringId="ver_intro_msg">Please verify your email address.</LocalizedString>  
          <LocalizedString ElementType="UxElement" StringId="button_continue">continue</LocalizedString>  
          <LocalizedString ElementType="UxElement" StringId="ver_but_send">Send verification code to email</LocalizedString>  
        </LocalizedStrings>  
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. James Hamil 27,211 Reputation points Microsoft Employee Moderator
    2021-08-03T19:05:35.117+00:00

    Hi @Syed Palayathar , please look over this document and match the formatting exactly. I noticed you don't have "#" after the StringID. Please also look through this document about setup and make sure everything matches. Please let me know if this fixes your problem. If not I will assist you further.

    Best,
    James

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.