Applicate Gateway with path based routing to multiple App Service that use Azure Active Directory Authentication

Todd Elliott 6 Reputation points
2021-01-27T17:06:15.02+00:00

I want to setup an Application Gateway with one DNS name www.mysite.com and handle path based routing to multiple Application Services that use Azure AD authentication.

I found an article using a custom DNS for the App Service with a reply from the AD Application that routes back through the gateway. But it appears I would need a unique custom dns name for each of my applications.

I do not want the user to see anything but one dns name.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
982 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Ryan Hill 26,471 Reputation points Microsoft Employee
    2021-02-06T04:23:32.217+00:00

    Hi @Todd Elliott ,

    You don't need a custom domain for each app service. Your custom domain will need be applied to your Application Gateway. Your reply URLs for AAD will need to match your https://<sitename>.azurewebsites.net address of your app service, as explained in the doc you referenced. For your multiple app services, you can override the host headers of the incoming requests to ensure it gets to the right app service.

    Regards,
    Ryan

    0 comments No comments

  2. Todd Elliott 6 Reputation points
    2021-02-11T21:23:38.027+00:00

    I am getting closer. Now my only issue is I have multiple Web Applications and I am using path based routing on the gateway. After logging in the reply URL from Azure AD is www.mydomain.com/.auth/login/aad/callback.

    I need my reply url "/.auth/login/aad/callback" to be unique for each web application so I can add it to the appropriate path based routing on the gateway.

    Thanks for your help!

    0 comments No comments