Multi-line LocalizedString in Azure AD B2C custom policy

Staisha Neville 30 Reputation points
2024-01-24T16:13:00.2633333+00:00

Hello, I would like to have a multi-line error message in this localized string, which is part of my Azure AD B2C Custom Policy.

<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">Oops! Your direct login attempt failed. If you signed up through a social account such as Google or Microsoft, please use that method instead. Please use the "Work or school Microsoft account" option if you use a university or work email address.</LocalizedString>

I would like there to be a new line after every period. I have tried using <br/>, , and \n, none of these were able to create a new line. Any help would be appreciated, thank you.

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Sami Pöysä 0 Reputation points
    2024-04-26T11:55:38.71+00:00

    If you include carriage return (CR) and line feed (LF) characters in a string and apply the CSS style white-space: pre-line, it will work.

    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.