LocalizedStrings with Ids starting with disclaimer_* not working in custom policy

Maha Nara 0 Reputation points

Trying to add a custom link in the sign-up page with StringIds 'disclaimer_' but getting validation errors during upload of custom policy.


Tried adding these strings to api.localaccountsignup.en, api.signuporsignin.en. The doc says we can add these to sign-up or self asserted page. https://learn.microsoft.com/en-us/azure/active-directory-b2c/localization-string-ids#sign-up-and-self-asserted-pages-user-interface-elements

<LocalizedString ElementType="UxElement" StringId="disclaimer_msg_intro">text</LocalizedString>
<LocalizedString ElementType="UxElement" StringId="disclaimer_link_1_text">Privacy Statement</LocalizedString>
<LocalizedString ElementType="UxElement" StringId="disclaimer_link_1_url">url</LocalizedString>
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
17,587 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 19,031 Reputation points Microsoft Employee

    Hi @Maha Nara ,

    Based on the documentation you provided, you can add these strings to the sign-up or self-asserted page. However, it's important to note that the localizedStrings element cannot contain text. Instead, it should only contain the localization string IDs and their corresponding values.

    Here's an example of how you can add the disclaimer_ strings to the api.signuporsignin.en file:

    <LocalizedResources Id="api.signuporsignin.en">
        <<span class=" active-doc-1 active-doc-2" data-doc-items="1,2">LocalizedString ElementType="UxElement" StringId="disclaimer_msg_intro">Disclaimer message intro</LocalizedString>
        <LocalizedString ElementType="UxElement" StringId="disclaimer_link_1_text">Privacy Statement</LocalizedString>
        <LocalizedString ElementType="UxElement" StringId="disclaimer_link_1_url">https[1](#doc-pos=1)[2](#doc-pos=2)</span>://privacy-statement-url.com</LocalizedString>

    Make sure to replace the StringId values with the correct IDs for your custom strings. Also, replace the LocalizedString values with the actual text and URL for your disclaimer message.

    Once you have updated the api.signuporsignin.en file, you can upload the custom policy again and see if the validation errors are resolved.

    If this doesn't help, it would be good for me to see the rest of your code. Please post it or email it to me at "azcommunity@microsoft.com"

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark it as "Verified" so other users can reference it.

    Thank you,