Custom policy - localized string not updating

Isaac Zolana 85 Reputation points
2024-03-08T21:32:28.06+00:00

In our "forgot password" flow, there are some strings we would like to update. One of those strings is "Verify code" which has "ver_but_verify" as a StringId, according to documentation.

When we update that string inside our custom policy, it doesn't update on the view, unlike the other strings we have updated.

User's image

User's image

It is likely using this keyUser's image

But when I try to add "but_verify_code" as a string id in our custom policy and upload the .xml file, I am prompted with an error message saying that the string id is invalid or something like that.

We have encountered the same issue with "ver_but_resend" string id. It simply won't update in the view.

Other information :

User's image

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

Accepted answer
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2024-03-25T22:57:07.78+00:00

    Hi @Isaac Zolana ,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    You were trying to update the "ver_but_verify" localized string in the B2C "forgot password" flow, but the text was not updating in the view.

    Solution:

    You learned that you were missing the "ElementId" and added it to the localized string.

    <LocalizedString ElementType="DisplayControl" ElementId="emailVerificationControl" StringId="but_verify_code">
    

    You were able to resolve it thanks to the example in the "Localize the UI" documentation here:

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-sendgrid?pivots=b2c-custom-policy#optional-localize-the-ui

    If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Isaac Zolana 85 Reputation points
    2024-03-12T20:21:04.62+00:00

    It seems I had forgotten an important step while setting my localized strings.

    In my case, it was "ElementId".

    <LocalizedString ElementType="DisplayControl" ElementId="emailVerificationControl" StringId="but_verify_code">Verify</LocalizedString>
    

    I managed to fix my issue thanks sendgrid's documentation :

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-sendgrid?pivots=b2c-custom-policy#optional-localize-the-ui

    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.