Dashboard credentials:
For make the credentials selection work, I change the system account to local system account instead of domain service account - when I select dashboard using the creds I stored in a secret variable, the dashboard is not using the credential I supllied.
param(
[PSCredential]$Credential
)
#
# You can call whatever cmdlets you like to conduct authentication here.
# Just make sure to return the $Result with the Success property set to $true
#
$Result = [Security.AuthenticationResult]::new()
if ($Credential.UserName -eq 'Admin' -or $Credential.UserName -eq "admin")
{
#Maintain the out of box admin user
$Result.UserName = 'Default Admin'
$Result.Success = $true
}
else
{
# Get current domain using logged-on user's credentials - this validates their credential
$CurrentDomain = "LDAP://DC=MY,DC=DOMAIN,DC=LOCAL" # Insert Your Domain Here
$domain = New-Object System.DirectoryServices.DirectoryEntry($CurrentDomain,($Credential.UserName),$Credential.GetNetworkCredential().password)
if ($domain.name -eq $null)
{
#"Authentication failed for $($Credential.UserName)!" | Out-File "C:\Logs\adlogin.txt"
New-PSUAuthenticationResult -ErrorMessage 'Bad username or password'
$Result.UserName = ($Credential.UserName)
$Result.Success = $false
}
else
{
<#$ADGroupList = (Get-ADGroup -Filter * -searchbase "OU=Powershell Universal Dashboard,OU=Resources,OU=Groups,OU=Accounts,DC=MY,DC=DOMAIN,DC=LOCAL" -Properties *).Name
foreach($ADGroup in $ADGroupList) {
if (Get-ADUserMemberOf -User $Credential.UserName -Group $ADGroup) {
}
}#>
write-host "Successfully authenticated with domain $($domain.name)"
"Authentication success for $($Credential.UserName)!" | Out-File "C:\Logs\adlogin.txt"
$Result.UserName = ($Credential.UserName)
$Result.Success = $true
}
}
$Result
@adam
Hi, I can log in when I upgrade to 4.0.5 - Some features were missing like dashboard advanced editor that I use to see my changes on the same page.
When I Upgrade to 3.9.10 - All my dashboards aren’t being loaded.