Skip to content

Latest commit

 

History

History
93 lines (55 loc) · 2.85 KB

solution7.md

File metadata and controls

93 lines (55 loc) · 2.85 KB

Challenge 7: Solution

Solution steps

We will nable Azure AD authentication for Dashboard App Container App using Azure Portal.

Enable Azure AD authentication

Navigate to the Container Dashboard App in Azure Portal and select the Authentication blade.

Select Add Identity provider and select Microsoft as the identity provider

Note
Review the extensive list of identity provider options available

In the Add identity provider page change the name of the identity provider to be prefixed with the unique name generated earlier in the lab (stored in variable $name)

Leave the other options with default values

Select Next: Permissions.

Accept the default values and click Add

The Dashboard App is now configured with Azure AD Authentication.

Verify authentication

Get the Dashboard URL from the variable ($dashboardURL) created in a previous challenge

If you don't have that variable available you can get it via the following command:

Bash
dashboardURL=https://dashboardapp.$(az containerapp env show -g $resourceGroup -n $containerAppEnv --query 'properties.defaultDomain' -o tsv)
echo 'Open the URL in your browser of choice:' $dashboardURL
PowerShell
$dashboardURL="https://dashboardapp.$((Get-AzContainerAppManagedEnv -ResourceGroupName $resourceGroup -EnvName $containerAppEnv).DefaultDomain)/"
Write-Host "Open the URL in your browser of choice: $dashboardURL"

Open the Url in a browser. You will be prompted for login similar to this

Make sure to select your organizational account if you have several accounts. Select login.

Next you will be presented with a consent dialog.

Accept the consent and you will be redirected to the Dashboard App

You have now enabled Azure AD authentication for Dashboard App Container App.

This concludes the series of challenge. You can follow the instructions in Clean up to remove Azure resources created in this hackaton.

The challenges