I have an Asp.Net core web app using Azure AD B2C for login. When I test it locally using the reply url http://localhost:54678/
in both the app and the settings in the Azure portal it works fine, I can login and the user is authenticated with no problem. But once I update the reply urls to the url of the app which is https://musdqapp.com
, I start getting an error of:
message=Correlation failed
This is how i have set up the OpenIdConnectOptions
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions()
{
Authority = "https://login.microsoftonline.com/tfp" + "/ticketfortb2c.onmicrosoft.com" + "/B2C_1_ticket-fort" + "/v2.0",
ClientId = "client_is", //the id of the b2c application
ClientSecret = "secret",
ResponseType = OpenIdConnectResponseType.IdToken,
UseTokenLifetime = true,
PostLogoutRedirectUri = "https://musdqapp.com/",
Events = new OpenIdConnectEvents()
{
OnTokenValidated = SecurityTokenValidated,
OnRemoteFailure = OnRemoteFailure
}
});
And on the Azure portal I have the reply url of the B2C app set to https://musdqapp.com/signin-oidc
Under Azure services, select Azure AD B2C. Or in the Azure portal, search for and select Azure AD B2C. In the left menu, under Manage, select Users. Select + New user.
Azure AD B2C provides various ways in which users can authenticate a user. Users can sign-in to a local account, by using username and password, phone verification (also known as password-less authentication). Email sign-up is enabled by default in your local account identity provider settings.
On 4 December 2020, the login.microsoftonline.com endpoint will be deprecated for accessing B2C tenants.
Can I use Azure AD B2C features in my existing, employee-based Azure AD tenant? Azure AD and Azure AD B2C are separate product offerings and cannot coexist in the same tenant. An Azure AD tenant represents an organization.
The reply URL must be https://musdqapp.com/ without the "signin-oidc". Reply URL and Redirect URI should match.
See this blog post for more information.
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