Applies to Product -Power Pages
What’s happening?
The custom Azure AD B2C sign-in page is not loading correctly when the JavaScript enforcing page layout is enabled. An error message appears in the console indicating a TypeError: "Cannot read properties of undefined (reading 'value')".
Reason:
This is likely caused by improper embedding of custom JavaScript files that may not adhere to the guidelines set by Azure AD B2C for hosting custom files. The URLs for these files may change with each deployment in the CDN, leading to errors.
Resolution:
- Ensure that all guidelines from Azure AD B2C for hosting custom files are followed. This includes enabling JavaScript as per the documentation.
- Remove any custom JavaScript and CSS files that may be causing conflicts.
- Use the HTML mentioned in the official article: "Customize the Azure AD B2C user interface for Power Pages" to see if the issue persists.
- Verify that the configuration for the sign-in page is set correctly, specifically ensuring that the URL ends with a trailing slash if required.
- Debug the errors using the DevTool extension to identify the cause of the issue.
- Run a site checker on the website to address any configuration issues that might be causing the error.
