CORS problems when redirect in Azure B2C

Alejandro Miranda 40 Reputation points
2024-12-02T09:19:25.4066667+00:00

Good Morning,

we are developing an Azure B2C tenant with custom policies and we are facing a problem when we want to automatically redirect from the web portal to the Azure B2C showing this error:

Access to XMLHttpRequest at 'https://XXXXXXXXX.b2clogin.com/XXXXXXXXXX.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1A_SIGNUP_SIGNIN&client_id=c94c14cd-4efc-4c34-a70b-f88e9aa5877b&redirect_uri=https://XXXXXXXXX/XXX/XX/inici.html&scope=openid%20offline_access&response_type=code&promt=login&response_mode=query&ui_locales=ca&origin=https://XXXXXXX/XXX/XX/XXXXX/XXXXXX?eventId=a0da3b0e-90e2-4b8a-95ca-f50654ec9bd6&languageId=51d9383e-1039-ed11-9db1-00224899347c' (redirected from 'https://XXXXXXXXX/XXXXX/XXXXXX/XXXX/XXXXX/XXXXXXXX/jcr:content.user-info.json?eventId=a0da3b0e-90e2-4b8a-95ca-f50654ec9bd6&languageId=51d9383e-1039-ed11-9db1-00224899347c') from origin 'https://XXXXXXXX' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

We have reviewing the Azure B2C settings and we dont see any CORS configuration where we can configurate CORS policies.

Regards.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,646 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,006 Reputation points Microsoft Employee
    2024-12-04T20:42:25.92+00:00

    Hi @Alejandro Miranda , please try enabling Access-Control-Allow-Origin: https://learn.microsoft.com/en-us/azure/healthcare-apis/fhir/configure-cross-origin-resource-sharing

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.