Localization of Default Value in Active Directory B2C Custom Policies

Christopher Norris 6 Reputation points
2023-01-17T02:26:09.8466667+00:00

Hello,

Please forgive me for not using [azure-ad-b2c] because the tag is no longer available. Even though the documentation on [https://learn.microsoft.com/en-us/azure/active-directory/develop/developer-support-help-options#post-a-question-to-microsoft-qa says to use it.

I am using Azure AD B2C Custom Policies and using a Paragraph Claim Type. We set the value by using the Default Value attribute for the input claim like shown:

<InputClaims>
     <InputClaim ClaimTypeReferenceId="userMsg" DefaultValue="Enter your name. Accounts with non-valid names may     be locked." />
</InputClaims>

The problem I am running into is that I am unable to find out how to set the DefaultValue based on the language. For example, if ui_locales = de (German) the DefaultValue will still be in English. I have reviewed the documentation for localization and not able to find a solution.

Any guidance would be greatly appreciated.

Thank you.

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

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,431 Reputation points Microsoft Employee Moderator
    2023-01-18T08:45:54.0566667+00:00

    Hi @Christopher Norris ,

    Thanks for reaching out.

    Due to recent change in the Q&A, there is some retagging recently reintroduced on which we are still working and will update the same in the documentation soon.

    To localize the claim, element type will be claimType and the possible values are: displayName, AdminHelpText or PatternHelpText to set the value to the claim. For your scenario, you can localize the claim as mentioned below:

    <LocalizedResources Id="api.localaccountsignup.de">
    <LocalizedStrings>
        <LocalizedString ElementType="ClaimType" ElementId="userMsg" StringId="DisplayName">
    Gib deinen Namen ein. Konten mit ungültigen Namen können gesperrt werden.</LocalizedString>    
    </LocalizedStrings>
    

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.


Your answer

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