How to perform authentication in container apps through Front Door's custom domain?

Boyan Stefanov 20 Reputation points
2024-08-21T10:27:07.6133333+00:00

I have a container app hosting a service that's currently publicly accessible. I'd like to add an authentication/authorization mechanism to the container app so it requires a login from Entra ID first(via front door custom domain).

Our container app and container app environment are with enabled ingress and limited to VNET only. We use Front Door premium with a private endpoint connection and Front Door is used to route the requests with an origin group(pointing to the origin host name of the container app) and route(pattern to match /allure-docker-service/ and origin path /allure-docker-service) to the container app.

I tried following the steps outlined in https://video2.skills-academy.com/en-us/azure/container-apps/authentication-entra#-create-an-app-registration-in-microsoft-entra-id-for-your-container-app and created & setup the app registration, but when we visit our service' public url (<custom domain>/allure-docker-service/projects/default/reports/latest/index.html) we are being redirected to https://<container app application url>/.auth/login/aad/callback which doesn't work because the container's not publicly available.

What is the correct configuration I should use to set up front door and the app registration in this case?

EDIT: This is what we currently have in Web > Redirect URIs:User's image

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
668 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
399 questions
{count} votes

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.