Advanced publish of internal Webapp with specific Homepage to Internet with Azure AD Application Proxy

In the last months I got more and more requests to implement Azure AD Application Proxy to publish various services to the internet. One option is not configurable over the Azure Portal, which can be very helpful. If you have to publish a server, for example https://webserver.contos.com to the internet, but you would like to direct users to a specific page on the server when they open it through MyApps, for example https://webserver.contoso.com/Special/StartPage.html. The crucial thing is, that often the page uses resources like JavaScript or CSS files from other directories on the server. If you just Publish https://webserver.contoso.com/Special/ then they are not accessible.

To publish such an app, just configure the app like you would when you publish the whole server. Then connect to Azure AD by PowerShell, you have to authenticate with global admin permissions:

 

 

Import-module AzureAD

Connect-AzureAD

 
Or if you haven’t installed the AzureAD module, then just use:

 

 

Install-module AzureAD

Connect-AzureAD

 
Then we have to select the app you just created. To make this easier, I added an Out-Gridview to let you choose the correct one with a UI:

 


$app = Get-AzureADApplication | Out-GridView -PassThru

 
Now you can validate if you have selected the correct application with entering:

 

 

$app | fl *

 

The last task is now to change the Homepage of the App. This property is available in the Webinterface, but Readonly:

But we can change this with the following PowerShell command:

 

 

Set-AzureADApplication -ObjectId ($app.ObjectId) -Homepage "https://webserver.contoso.com/Special/StartPage.html"

 

I hope this will help you in one of your projects.

Thomas Kurth
Follow me

Thomas Kurth

Principal Workplace Consultant at baseVISION AG
I’m a consultant, trainer and architect for workplace management and enterprise mobility projects with Microsoft Technologies in the past eight years. I love to push and design the modern workplace based on Windows 10, EM&S and O365 for my customers which is the only answer for the current security threats, agile world and the fast-changing business requirements of my customers. Important for me is to simplify and automate the operational processes, because there are the highest costs.

MCSEMCTCMCE
Thomas Kurth
Follow me