Problem with changing screen title, button label via localization

Szeto, Sam 65 Reputation points
2023-11-14T02:33:10.5533333+00:00

Hi,

I am new to Microsoft Entra ID. I am migrating our authentication/MFA to Azure AD B2C using custom policy because, among other reasons, the passwords are hashed for our existing users.

I tried to change the screen heading and button label by editing the TrustFrameworkLocalization.xml but it doesn't seem to be reflected on the screen during testing. For example, the sign in replying policy calls the User Journey "SignInWithUsername"

User's image

And it uses the Content Definition "api.signuporsignin"

User's image

And it uses the LocalizeResources "api.signuporsignin.en"

User's image

I changed the text on two of the UxElement

User's image

but the changes didn't reflect on the screen during test

User's image

One thing I want to mention is I am using a custom html defined in the TrustFrameworkExtenstion.xml file

User's image

So what am I missing? Why the editing in the TrustFrameworkLocalization.xml wasn't reflect on the sign in screen?

Thanks,

Sam

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,360 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 36,816 Reputation points Microsoft Employee
    2023-11-16T01:27:30.9233333+00:00

    Hi @Szeto, Sam ,

    In this case will need to manipulate the DOM for your requirements. B2C injects the html inside the predefined div with id set to api (<div id="api>) as described here. You will need to check the structure of the html elements in the developer tools and then select the element using JavaScript to manipulate the DOM. You can use jQuery and select the elements like in this example where the user selects the Email Address label and removes it, and also replaces the "Sign in with your email address" text:

     $("label[for='email']").remove(); 
    
     $("#localAccountForm .intro h2").text("your custom text");
    
    
    
    
    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.