I deleted my storage account which held the folder containing the B2C sign-in/sign-up policy custom UI files. Realizing my mistake, I created a new storage account and uploaded the policy files. I updated the paths in the policy configuration. Now, when clicking login, instead of the Microsoft form I get:
An unhandled exception occurred while processing the request.
InvalidOperationException: Invalid non-ASCII or control character in header: 0x000D
Microsoft.AspNetCore.Server.Kestrel.Internal.Http.FrameHeaders.ThrowInvalidHeaderCharacter(char ch)
I set a breakpoint in OpenIdConnectOptionsSetup_OnRemoteFailure
where the context exception reveals:
Message contains error: 'server_error', error_description:
'AADB2C90047: The resource 'https://{StorageAccount}.blob.core.windows.net/loginui/customlogin.html' contains script errors preventing it from being loaded.
Correlation ID: fc9f9ac5-14bc-4af4-992c-a2cf0050316d
Timestamp: 2017-10-24 15:10:00Z', error_uri: 'error_uri is null'.
However, this error doesnt make much sense when the template looks like this:
<!DOCTYPE html>
<html>
<head>
<title>!Add your title here!</title>
</head>
<body>
<div id="api"></div>
</body>
</html>
I'm new to Azure, so I'm sure I'm missing something obvious. I just need the templates to work again.
Yes. Azure Active Directory (AD) Connect and components of V1. 0 are to be deprecated and retired on and prior to August 30, 2022. This will mean that the version will no longer be in operational order, and Microsoft will no longer be able to provide support.
In the Azure portal, search for and select Azure AD B2C. In the left-hand menu, select User flows, and then select the B2C_1_signupsignin1 user flow. Select Page layouts, and then under Unified sign-up or sign-in page, select Yes for Use custom page content. In Custom page URI, enter the URI for the custom-ui.
On the Portal settings | Directories + subscriptions page, find your Azure AD B2C directory in the Directory name list, and then select Switch. In the Azure portal, search for and select Azure AD B2C. On the overview page, under Policies, select Identity Experience Framework. Select Policy Keys and then select Add.
(Adding answer for completeness.)
Azure AD B2C loads the page UI customization files to the end-user's browser using Cross-Origin Resource Sharing (CORS).
If the customization files are deployed to a storage account, then this requires you to allow CORS on the storage account, as documented here.
You can test then whether CORS has been allowed as required as documented here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With