question

AiKaanLabs-9545 avatar image
0 Votes"
AiKaanLabs-9545 asked AiKaanLabs-9545 commented

Customize the user interface in AD B2C custom policy

Hi,

I am trying to customize the user interface for the app factor registration page <ContentDefinition Id="api.selfasserted.appfactor.registration">

I changed the LoadURI to point to https://aikaan.z13.web.core.windows.net/index.html

I have enabled CORS to allow all methods for https://aikaanms.b2clogin.com and https://login.microsoftonline.com

![90286-image.png][1]

But when I run the policy I get an error

AADB2C90047: The resource 'https://aikaan.z13.web.core.windows.net/index.html' contains script errors preventing it from being loaded.
Correlation ID: 1cb22f3b-7cdf-43ab-9f9e-53fc37b13907
Timestamp: 2021-04-22 09:36:59Z

Any help is appreciated
[1]: /answers/storage/attachments/90286-image.png

azure-ad-b2c
image.png (26.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered

Hi @AiKaanLabs-9545 · Thank you for the confirmation.

To resolve the issue, you need to navigate to your Storage Account (where the HTML and CSS files are hosted) and configure CORS settings as highlighted below:

59244-image.png

Important: Under Allowed Origins, entire domain name must be entered in lowercase letters.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AiKaanLabs-9545 avatar image
0 Votes"
AiKaanLabs-9545 answered AiKaanLabs-9545 commented

@amanpreetsingh-msft

Yes CORS is enabled. You could see the attached image in my original message.

Further based on one of your earlier message (https://docs.microsoft.com/en-us/answers/questions/236653/azure-ad-b2c-tutorial-for-customize-ui-causes-a-sc.html) I tried URL https://moviesdiag132.blob.core.windows.net/b2c/unified2.html . This also produced the same error.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sorry my bad, "*" was missing on "allowed header" and "exposed headers"

It is working now!

0 Votes 0 ·