Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes an error that occurs when trying to sign in to an app that is set up for Azure AD B2C.
Original product version: Microsoft Entra ID
Original KB number: 3092588
Symptoms
When you try to sign in to an app that is set up for Microsoft Azure Active Directory (AD) business to consumer (B2C), you receive the following error message:
Server Error in '/' Application
Response status code does not indicate success: 404 (Not Found)
Description : An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details : System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found)
Source Error : An unhandled exception occurred during the execution of the current web request. Information regarding the origin and locations of the exception can be identified using the exception stack trace below.
Stack Trace :
...
[IOException: Unable to get document from:https://login.microsoftonline.com/contoso.onmicrosoft.com/.well-known/openid-configuration?p=Policyname]
Cause
The sign-up policy name may be missing or incorrect in the Web.config file for the app.
Resolution
To fix this issue, follow these steps:
Open the Web.config file for the app.
In the Web.config file, verify that the app key
ida:SignUpPolicyIdexists.Replace the value of the app key with the name of the sign-up policy that you provided in the Azure AD B2C admin portal.
The changed part of the file resembles the following:
<appSettings> <add key="ida:SignUpPolicyId" value="B2C_Signup_Policy_Name"> </appSettings>