App services behind Applicaiton Gateway and applicaiton authentication using Azure SSO

Bineet Kumar 1 Reputation point
2021-11-12T06:26:56.867+00:00

I have an application which I am trying to migrate to the App services. The authentication was windows auth before migration so I moved it to Azure SSO.

Background -

  • The application is registered within Azure to leverage single sign on and we have a reply URL configured within the application and redirect URI configured in Azure SSO for URL - https://abc.customdomain.com
  • The app is hosted within App services and the Azure endpoint URL of the app services is https://abc.azurewebsites.net
  • I have also setup a TXT record created within the custom Domain and added this to App service to verify the ownership of the DNS.
  • The custom DNS https://abc.customdomain.com is configured and pointing to the application gateway.
  • The application gateway is configured to point to the App service.

Issue – When I try testing the application the SSO works as expected but the moment it tries redirecting to the application after Sign on it breaks because of the incorrect redirect URL as the app services has the URL – https://abc.azurewebsites.net

After setting up a CNAME and pointing it to the App services the hosted site works, but we want to have the traffic flow from the Application gateway.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
958 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,876 questions
{count} votes