Bad gateway / EACCES when adding loginpage

I just got my license - and setup Universal Dashboard, running behind iis on windows 2016.
a basic dashboard was working.
I wanted to use azure ad to authenticate with.

so really basic dashboard.ps1

Import-Module UniversalDashboard
$appid = 'guid'
$TenantId = 'guid'

$MicrosoftLogin = New-UDAuthenticationMethod -ClientId $appid -Instance 'https://login.microsoftonline.com' -Domain 'corp.domain.com' -TenantId $TenantId

$LoginPage = New-UDLoginPage -AuthenticationMethod @($MicrosoftLogin) 

$MyDashboardPage = New-UDPage -Url "/myDashboard" -Endpoint {
    New-UDCard -Title "Welcome," -Text "This is your custom dashboard."
}

$Dashboard = New-UDDashboard -LoginPage $LoginPage -Page @($MyDashboardPage)

Start-UDDashboard -Dashboard $Dashboard -AllowHttpForLogin

browse local and i am getting a 502.3 bad gateway
*had a screenshot but new users can only post one picture…

if I run from the command line as iis would:
image

I haven’t found any help online - anyone know what i might be doing wrong?

thanks

use the -Wait parameter for Start-UDDashboard.

thanks that worked,

now i am getting “the reply url specified does not match the reply urls in the application”
following this:
https://adamdriscoll.gitbooks.io/powershell-universal-dashboard/security/authentication/azuread.html

troubleshooting continues!

The server and Port must match exactly what you have specified in azure under app registrations > relpy url.

So whatever your dashboard URL is, make that your reply url.