norjen
January 31, 2019, 2:58pm
1
Hi,
I’m trying to setup Azure AD login and have created the below sample based on //adamdriscoll.gitbooks.io/powershell-universal-dashboard/content/security/authentication/azuread.html:
$AuthenticationMethod = New-UDAuthenticationMethod -Provider AzureActiveDirectory -ClientId ‘My Azure App ID’ -Instance ‘https://login.microsoftonline.com/ /oauth2/authorize’ -Domain .onmicrosoft.com -TenantId ‘’
$LoginPage = New-UDLoginPage -AuthenticationMethod $AuthenticationMethod -Title “AzureAD”
$Page1 = New-UDPage -Name “Page1” -Icon calendar -Content {
New-UDCard -Title “Hello, Universal Dashboard”
New-UDTextbox -Value “test”
}
Start-UDDashboard -Port 1000 -AllowHttpForLogin -Dashboard (
New-UDDashboard -Title “Dashboard” -Pages @($Page1) -LoginPage $LoginPage
)
When starting it up I get “SIGN IN WITH AZURE ACTIVE DIRECTORY”, but when i select this option I’m redirected to “localhost:1000/signin” and get an HTTP 500 error.
What am I doing wrong?
/Jens
norjen:
-TenantId
You aren’t specifying a TenantID.
https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id
Also you don’t quite have all the right parameters. Here is my AzureAD authentication, currently working fine. v 2.1.0
# Authentication
$AzureADParams = @{
ClientID = MY_CLIENT_ID
Instance = 'https://login.microsoftonline.com'
Domain = 'MY.FQDN.COM'
TenantID = MY_TENANT_ID
}
$AuthenticationMethod = New-UDAuthenticationMethod @AzureADParams
It looks like you’re looking at some old documentation. Current AzureAD auth documentation is here:
https://adamdriscoll.gitbooks.io/powershell-universal-dashboard/security/authentication/azuread.html
1 Like
norjen
February 4, 2019, 10:10pm
3
Great,your example helped me and I have it all working.
1 Like
mabster
November 11, 2021, 10:12pm
4
Hey gang, where is the Azure AD authentication documentation now? Once we purchase a licence we will want to get Azure AD auth set up ASAP.
Hey @mabster
I think the above thread is relevant to UD v2,
As for the latest version of PSU, I’m currently using OIDC:
1 Like