The Hidden Steps Microsoft Forgot to Document: Securing Azure App Service Authentication Behind Front Door with Private Link
- Sebastian F. Markdanner
- 2 days ago
- 7 min read
Today I want to walk through how to configure Azure App Service Authentication when your App Service sits behind Azure Front Door and is accessed through a Private Link.

On a dreadful day in october 2025, I received something that most IT people fear - a request from a client!
The request included information from the client, that they were struggling with authentication on a Web App deployed behind Azure Front Door using Private Link. What looked like a straightforward setup quickly turned into a surprisingly tricky problem, mostly due to missing or incomplete documentation.
After digging into the issue, reproducing it in a separate environment, and spending more time troubleshooting than I’d like to admit, I decided to document the actual working solution here.
Table of Contents
The Authentication Issue
The client reported that after enabling authentication on the Web App and disabling public access, they consistently landed on an “access denied” page. Sometimes it showed a blue 403 screen; other times it was just a blank page with the message “You cannot access this resource.”
When I was first pulled into the issue, I couldn’t make sense of it. Based on the configuration, everything should have been working normally. So I went through the usual checklist:
✅ Microsoft Entra configured as the identity provider on the Web App
✅ Managed Private Link to Azure Front Door approved under the Web App’s networking settings
✅ Redirect URI configured in the App Registration used for the IdP configuration
✅ Redirect URI to the Front Door configured in the Web App’s authentication settings
Everything looked correct on paper.
To validate the issue, we tried reproducing the setup in our own environment — and sure enough, we hit the exact same error pages:

At this point, the behavior technically made sense: public access was disabled on the Web App, and Azure Front Door wasn’t properly involved in the authentication flow. So the Web App was simply rejecting the request before authentication could even happen.
The confusing part was that nothing in Microsoft’s documentation suggested that the setup required anything beyond what we had already configured.
Reference: Microsoft Learn: Connect Azure Front Door Premium to an App Service origin with Private Link
We tried several variations of the setup and saw inconsistent results, sometimes no authentication flow at all, sometimes we got the authentication prompt but were blocked afterward, and occasionally we were blocked immediately without any prompt.
After a lot of google-fu, trial and error, and rebuilding the entire setup more than once, we finally landed on a configuration that provided a consistent authentication experience, even with public access fully disabled, through the
To save others from the same pain, let’s walk through the exact solution.
Configuring Azure App Service Authentication Behind Azure Front Door
Setting up authentication for an Azure App Service behind Azure Front Door sounds straightforward on paper but in reality, it involves a series of configurations across Azure Portal, your DNS registrar, and even a manual JSON update. Below is the complete walkthrough, starting from a clean deployment and building toward the final working solution.
Initial configuration
To illustrate the process clearly, I’m starting with a fresh Azure App Service and a new Azure Front Door instance, following Microsoft’s recommended deployment pattern before adding the missing pieces.
Create the App Service
Within the Azure Portal search for App Services.
Click on it, and choose +Create to begin creating a new Web App.

Fill in the required fields for the Web App.
Note: The minimum required SKU for this scenario is Premium.

Once the Web App is created, go to Authentication, then select Add identity provider.

Once the Web App is created, go to Authentication, then select Add identity provider.


Create and Connect Azure Front Door
With authentication enabled on the Web App, the next step is to create (or connect an existing) Azure Front Door directly from within the Web App. This ensures the correct association and helps streamline the Private Link integration.
Within the web app navigate to Networking, then under Optional inbound services, click View details

Either create a new Front Door or select an existing one, then fill out the required configuration.

After Azure finishes deploying, or as I like to call it, after a “Microsoft Minute™️”, head back to the Web App to approve the Private Endpoint connection under Networking.


Disable Public Access
Next, restrict direct access to the Web App. Go to Access Restrictions and disable public access


At this point, the App Service and Front Door are configured and linked, but authentication still won’t work as expected when accessed through Front Door with Private Link. Normally, you would add the Front Door hostname as a redirect URI in both the App Registration and the Web App authentication settings, and while that is part of the final configuration, it’s not enough on its own.
Before updating any authentication settings, we’ll walk through the additional steps required to get a fully working solution without redoing work later.
Addition configuration for working solution
To get authentication flowing correctly through Azure Front Door while the Web App remains private, several more configurations are required. These are the parts the documentation doesn’t cover.
Here’s the full list of what we’ll configure:
Add custom domains to both the Web App and Front Door (same root domain)
Example:
webapp.chanceofsecurity.com
frontdoor.chanceofsecurity.com
Add the Front Door domain to CORS
Add the Front Door domain to the Web App authentication configuration
Update redirect URIs in the App Registration
Update the authsettingsV2.json forward proxy setting on the Web App
Once these are in place, the authentication flow works through Front Door, even with public access disabled.
Let’s walk through each step in detail.
Adding custom domains
In the Web App, go to Custom domains and click Add custom domain.

Enter the custom domain. In this example, I’m using an external registrar with a managed certificate. Azure provides the DNS records you’ll need to add..

Add the DNS records to your registrar and wait for validation.

Next, switch to Azure Front Door. Go to Domains and click Add a domain.

Choose the domain and click Add

The domain will appear in a pending state. Click the Validation state to view the DNS records required for validation


Add the corresponding TXT and CNAME records in your DNS registrar again and wait for propagation

Once validated, associate the newly added custom domain with your desired Front Door endpoint and route

Adding Front Door domain within the CORS config
To allow the authentication flow to redirect through Front Door, the domain must be listed in CORS.
In the Web App, open CORS and add the Front Door custom domain to Allowed Origins.

Updating the Authentication settings on the Web app
In the Web App, go back to Authentication and select Edit on the authentication configuration.
Add the Front Door custom domain to Allowed external redirect URLs.

Updating the Microsoft Entra App Registration
Next, update the redirect URIs for the application registration automatically created during IdP setup.
Navigate to Microsoft Entra -> App registrations, search for the Web App’s name, and open it.
Go to Authentication and replace the existing redirect URIs with your Front Door domain using this format:
https://<frontdoor.chanceofsecurity.com>/.auth/login/aad/callback
Configure the Forward Proxy Setting (authsettingsV2.json)
This step is critical - and undocumented. The authentication flow only works behind Front Door + Private Link when the forwardProxy.convention is set to "Standard".
If any configuration change is made in the Web App afterward, this setting resets, so it must be applied last.
Run the following PowerShell snippet, either locally or for ease of use, from the Azure Cloud Shell:
# Variable configurations
$subid = (Get-AzSubscription).id
$rg = <resourcegroup-name>
$webapp = <webapp-name>
# Get current configuration
$current = az rest --method get --url "https://management.azure.com/subscriptions/$subid/resourceGroups/$rg/providers/Microsoft.Web/sites/$webapp/config/authsettingsV2?api-version=2020-09-01" | ConvertFrom-Json
# Update proxy setting
$current.properties.httpSettings.forwardProxy.convention = "Standard"
# Convert updated config to json
$body = $current | ConvertTo-Json -Depth 100
# Update config
az rest --method put --url "https://management.azure.com/subscriptions/$subid/resourceGroups/$rg/providers/Microsoft.Web/sites/$webapp/config/authsettingsV2?api-version=2020-09-01" --body $bodyAfter this change, authentication will finally work through Front Door with Private Link and the Web App locked down!

TL;DR Configuration steps
If you just need the quick reference, here’s the full sequence of steps required to get Azure App Service authentication working behind Azure Front Door with Private Link:
Create the Azure Web App and Azure Front Door
Associate the Web App with Front Door (via Optional Inbound Services / Private Link)
Disable public access on the Web App via Access Restrictions
Add Microsoft Entra as the identity provider on the Web App
Configure custom domains on both the Web App and Front Door (same root domain)
Update the Entra App Registration with the Front Door custom domain as a redirect URI
Update the Web App authentication settings to include the Front Door domain as an allowed redirect
Add the Front Door custom domain to CORS on the Web App
Update authsettingsV2.json and set the convention:
httpSettings.forwardProxy.convention = "Standard"Conclusion
That brings us all the way from the initial “Why is nothing working?” moment to a fully functional, secure authentication flow running through Azure Front Door with Private Link.
The setup itself is not inherently complicated, it’s the missing documentation and the unexpected extra steps that make the journey confusing. Once the custom domains, redirect URIs, CORS configuration, and the forward proxy setting are aligned, the whole flow snaps into place and works exactly as you’d expect.
Now for the mandatory bad joke to break from the headaches this problem have caused!
I told my wife she should embrace her mistakes...
She turned and gave me a hug! 😎
With everything configured correctly, you now get a properly locked-down App Service, seamless Microsoft Entra authentication, and a clean, controlled entry point through Azure Front Door without ever exposing the Web App publicly. If you’ve run into this issue before, hopefully this walkthrough saves you from the same troubleshooting loop.
If you ever run into the same issue, I hope this walkthrough saves you from the same troubleshooting maze.
Until next time stay tuned!
