Azure AD B2C- Add help URL to signin page

Ben O'Malley 41 Reputation points
2022-12-08T15:22:37.61+00:00

I'm using custom policies to create an Azure AD B2C custom sign-in flow. We're currently using one of the default templates for the sign-in page, but I'd like to add an additional URL to the signin page which provides a link to documentation for users having trouble signing in.

I've tried to follow https://learn.microsoft.com/en-us/azure/active-directory-b2c/customize-ui-with-html?pivots=b2c-custom-policy to add custom HTML to the sign-in page, I've hosted an HTML file with the following content on an azure blob store:

<div id="api"></div>
<div>
<a href="https://www.placeholder.com">Having trouble signing in?</a>
</div>

and added a contentdefinition to my TRUSTFRAMEWORKEXTENSIONS policy to point to this HTML file.

<ContentDefinition Id="api.signuporsignin">
<LoadUri>https://<blobstorepath>.blob.core.windows.net/azure-b2c-html/help-link.html</LoadUri>
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
<DataUri>urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:2.1.5</DataUri>
<Metadata>
<Item Key="DisplayName">Signin and Signup</Item>
</Metadata>
</ContentDefinition>

When I do this my login page does get updated with the new link, but it also loses all formatting and company branding. I understand I could update the HTML file I'm linking to to contain all the necessary CSS and HTML but I'd really rather avoid that, I just want to use the standard template I already have but with a link added to the bottom, how can I achieve that?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
3,238 questions
{count} votes

Accepted answer
  1. Michael Taylor 59,901 Reputation points
    2022-12-08T15:50:32.823+00:00

    If you define a custom HTML policy then you are completely responsible for the HTML, including styling. Basically instead of Azure providing the default HTML it renders your HTML file instead. Inside your HTML you have to tell Azure where to inject its "sign in" elements. This gives you complete control over the formatting.

    To inject something into the existing template while keeping its styling you should download the template that you want to use from Azure. The templates are available in the documentation link you provided. Download the template, add your custom HTML where you need it and store it in Azure. If you ever want to change the styling of the template (from say classic to blue), then you'll need to grab the new HTML and update it again.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.