diff --git a/Modules/CippExtensions/Private/Get-HaloToken.ps1 b/Modules/CippExtensions/Private/Get-HaloToken.ps1 index 9e3bc5434e41..2a9cda303da2 100644 --- a/Modules/CippExtensions/Private/Get-HaloToken.ps1 +++ b/Modules/CippExtensions/Private/Get-HaloToken.ps1 @@ -11,10 +11,11 @@ function Get-HaloToken { client_secret = (Get-AzKeyVaultSecret -VaultName $ENV:WEBSITE_DEPLOYMENT_ID -Name 'HaloPSA' -AsPlainText) scope = 'all' } - if ($Configuration.tenant) { $Tenant = "?tenant=$($Configuration.tenant)"} + if (![string]::IsNullOrEmpty($Configuration.tenant)) { $Tenant = "?tenant=$($Configuration.tenant)" } $token = Invoke-RestMethod -Uri "$($Configuration.AuthURL)/token$Tenant" -Method Post -Body $body -ContentType 'application/x-www-form-urlencoded' return $token - } else { + } + else { throw 'No Halo configuration' } } \ No newline at end of file diff --git a/Scheduler_CIPPNotifications/run.ps1 b/Scheduler_CIPPNotifications/run.ps1 index 0addf8cd56b3..1ea78e340157 100644 --- a/Scheduler_CIPPNotifications/run.ps1 +++ b/Scheduler_CIPPNotifications/run.ps1 @@ -156,7 +156,7 @@ if ($config.sendtoIntegration) { } catch { Write-Host "Could not send alerts to ticketing system: $($_.Exception.message)" - Write-LogMessage -API 'Alerts' -tenant $Tenant -message "Could not send alerts to : $($_.Exception.message)" -sev info + Write-LogMessage -API 'Alerts' -tenant $Tenant -message "Could not send alerts to ticketing system: $($_.Exception.message)" -sev info } } diff --git a/version_latest.txt b/version_latest.txt index 64b5ae3938a0..4f3470c1664f 100644 --- a/version_latest.txt +++ b/version_latest.txt @@ -1 +1 @@ -4.4.0 \ No newline at end of file +4.4.1 \ No newline at end of file