Azure AD B2C Custom Policy - username field not support french characters in forgot password page

Balamurugan Mani 21 Reputation points
2023-03-14T08:59:45.44+00:00

We have developed our B2C Sign in, Signup and forgot password flow using custom policy but in Forgot password page, the User name field its not supporting é è ê ë ç ñ ø ð these character. In our case we have french user who tries to use these character..

Note : For Sign in, Signup custom policy is supporting but in forgot password field its not supporting above mentioned characters.

Kindly help me with this

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

3 answers

Sort by: Most helpful
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2023-03-15T09:24:07.99+00:00

    Hi @Balamurugan Mani ,

    Thanks for reaching out.

    You need to add these characters in the regular expression of claim type which you are using to enter username in the forgot password profile.

    I would suggest you check the claim type you are passing in sign up and sign in technical profile to define the username and its regular expression to include those French characters in username.

    </ClaimType>
    			<ClaimType Id="issuerUserId">
    				<DisplayName>Username</DisplayName>
    				<DataType>string</DataType>
    				<UserHelpText/>
    				<UserInputType>TextBox</UserInputType>
    				<Restriction>
    					<Pattern RegularExpression="^[a-zA-Z0-9]+[a-zA-Z0-9_-]*$" HelpText="The username you provided is not valid. It must begin with an alphabet or number and can contain alphabets, numbers and the following symbols: _ -"/>
    				</Restriction>
    			</ClaimType>
    

    Hope this will help.

    Thanks,

    Shweta

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

    0 comments No comments

  2. Balamurugan Mani 21 Reputation points
    2023-03-15T15:06:15.36+00:00

    Hi @Shweta Mathur

    Thanks for the response. let me clarify my scenario one more time.

    1. We are not using Azure B2C UI to signup new user. We are using power automate flow to create new user in Azure B2C.
    2. We are using Azure custom policy to solve the username not accepting non english characters in Azure B2C sign in. we have no issue on sign in(see below image). it's working for all the characters including french characters using custom policy.

    User's image

    3.The problem is we are using Azure custom policy for forgot password also. But here the username field not accepting french characters(see below image).

    User's image


  3. Balamurugan Mani 21 Reputation points
    2023-03-17T07:03:07.1866667+00:00

    Hi @Shweta Mathur attached the custom policy XML files which i am currently using.

    Image 1 is the existing username with regular expression in the custom policy. But this regex not working for french characters so we created new username field without regex(see image 2). It's supporting for all the characters in sign in.

    The same "signInName" field is using for both sign in and forgot password page. But in forgot password it's not working.

    Image 1:

    User's image

    Image 2:

    User's image

    TRUSTFRAMEWORKBASE (1).xml TRUSTFRAMEWORKEXTENSIONS.xml SIGNUP_SIGNIN.xml PASSWORDRESET.xml


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.