Custom Domain AD B2C error 502 authorize endpoint

Pedro Cori Amesquita 0 Reputation points
2024-12-09T20:51:06.46+00:00

I am setting up a custom domain for the B2C endpoint, it managed this masquerading but I am getting a 502 error on the Authorize endpoint. I am using an application gateway to achieve this masking.

Scenario 1:

When I send the value of the <custom-domain> in the host header from the application gateway to call the B2C backend, I get the following response:

https://<custom_domain>/<tenant>/oauth2/v2.0/authorize -> 502 error

Scenario 2:

When I send the value <B2C default domain > in the host header from the application gateway to call the B2C backend, I get the following response:

https://<custom_domain>/<tenant>/oauth2/v2.0/authorize -> ok

https://<custom_domain>/<tenant>/B2C_1A_policy/client/perftrace -> 400 error

https://<custom_domain>/<tenant>/B2C_1A_policy/SelfAsserted -> 400

This is the same case as described in the following ticket: https://learn.microsoft.com/en-us/answers/questions/1865853/azure-ad-b2c-cant-set-cookie-with-cross-domain

Showing the next message on the authorize endpoint : "This attemp to set a cookie via set-cookie header was blocked because its Domain atrribute was invalid with regard to the the current host url"

From the browser console, I have noticed that a url is referenced to obtain the static ones that refer to the default domain. I don't know if this is causing the first scenario to obtain a 502 code on the authorize endpoint.

I am using the Identity Experience Framework, I would like to rule out if I have to add this custom domain in the xml.

Thanks in advance.

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

2 answers

Sort by: Most helpful
  1. Joenorwood1973@gmail.com 0 Reputation points
    2024-12-12T19:53:11.7066667+00:00

    Gforce now account linked to my Microsoft Xbox account so I can download Gforce now game ready drivers on my Xbox one x

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.