How to redirect Microsoft Identity authentication to application proxy URL rather than internal URL

Viewed 404

I recently installed the Azure AD Application Proxy connector on my company's internal server using Microsoft's tutorial. I have a Blazor application configured to use Azure AD authentication setup on this server, using all the default Microsoft Identity authentication code when initially creating the Blazor app, all I did was fill out the app settings for my tenant/client IDs. I have configured the Enterprise Application within Azure for this app to use the newly created application proxy with the pre-authentication set to passthrough. For simplicity's sake, let's say my internal URL for my web app is "myapp.domain.local" and my external URL (which is the default msappproxy URL) is "myapp-company.msappproxy.net". I have also configured the authentication section of the App Registration to use the following redirect URIs (my app's callback path is /signin-oidc): https://myapp.domain.local/signin-oidc https://myapp-company.msappproxy.net/signin-oidc

The problem I am encountering is when I try to access my app from the browser using the app proxy URL (myapp-company.msappproxy.net), the authentication configured on the app (not the pre-authentication for the app proxy) seems to be redirecting back to the internal URL (myapp.domain.local), rather than using the proxy URL that I had originally used to access the web app. Obviously this will not work when connected to a device off of our internal network. I do not want to disable authentication within my app and enable Azure AD authentication for the pre-authentication of the application proxy. I simply want the app's authentication to redirect to the app proxy's URL instead. Is there any way to achieve this?

1 Answers

To enable Application Proxy on your app service, you should be Global Administrator.

  1. Open Azure Portal > Click on Azure Active Directory > Select Application Policy - click on Yes to enable.
  2. Configure the application proxy connector by downloading and installing it. During the installation, it asks for Azure login details. Provide an account which have azure global admin privileges.
  3. To publish the application: Go to Azure AD > Enterprise Applications > Click on New Application > All > On-premises application and provide configuration data for that application in that window like below:

enter image description here

After adding the information, click on Add and Publish. Add users and assign the access to it. After logging to it, the application shows like:

enter image description here

For more information, refer here and how to access the web apps via application proxy.

Related