Customaize UI placeholder messages & error messages based on query params

Yogesh Agrawal 1 Reputation point
2021-01-11T12:13:07.377+00:00

Hi,
Is there's any way to customize the default placeholder messages and error messages in the login form
55356-b2c-ui-issue.png

We're customizing this screen using query params, as a single B2C tenant is used across multiple apps, and it's not possible to create and upload policy for each app.

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

2 answers

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,951 Reputation points Moderator
    2021-01-11T13:11:48.67+00:00

    Hello @Yogesh Agrawal · Thank you for reaching out.

    Please find below the parameters to customize the messages, you have highlighted in your question.

    <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">The username or password provided in the request are invalid.</LocalizedString>  
    <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfInvalidPassword">The username or password provided in the request are invalid.</LocalizedString>  
    

    With above parameters, for both invalid username and invalid password, it will return same message, which is "The username or password provided in the request are invalid."

        <LocalizedString ElementType="UxElement" StringId="required_field">This information is required.</LocalizedString>  
    

    above parameter can be used to customize "This information is required." message.

    Read More: https://learn.microsoft.com/en-us/azure/active-directory-b2c/localization-string-ids#sign-up-or-sign-in-example

    Use UserHelpText parameter for the pre-populated text in a given text box, under the claims schema where the sign in and password claims are defined. Please refer to UserHelpText parameter in the examples documented here: ClaimsSchema

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


  2. Yogesh Agrawal 1 Reputation point
    2021-01-13T17:44:47.6+00:00

    Hi @AmanpreetSingh-MSFT

    Changed StringId="UserMessageIfInvalidPassword in policy, but seems not working.
    Attached the screenshots of the changes, did in the policy XML file.

    Kindly check.

    56331-ad-b2c-localized-strings.png56303-ad-b2c-msg-not-changed.png

    0 comments No comments

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.