'ReplyUrl of Authorization Server not found

I am self-hosting the api management developer portal using a custom domain name via a Azure CDN and storage account. Authentication is provided using Azure AAD B2C. We have configured an authorization server to request access token using authorization code flow. When we access the managed site it correctly requests the access token and processes it using the reply url "https://apim-instance-name.developer.azure-api.net/signin-oauth/code/callback/name-of-auth-server", however, when we use the custom domain name it returns 404 not found when AAD B2C redirects the browser to https://custom-domain-name.com/signin-oauth/code/callback/name-of-auth-server". Is there something I'm missing?

Screenshot of redirected browser not finding reply url

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source