Skip to content

Commit 92b19ec

Browse files
authored
Merge pull request #217 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents ad59baa + 5e4e482 commit 92b19ec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecAccessChecks.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Function Invoke-ExecAccessChecks {
2525
if ($Request.Query.SkipCache -ne 'true' -or $Request.Query.SkipCache -ne $true) {
2626
try {
2727
$Cache = Get-CIPPAzDataTableEntity @Table -Filter "RowKey eq 'AccessPermissions' and Timestamp and Timestamp ge datetime'$TimestampFilter'"
28-
$Results = $Cache.Data | ConvertFrom-Json
28+
$Results = $Cache.Data | ConvertFrom-Json -ErrorAction Stop
2929
} catch {
3030
$Results = $null
3131
}
@@ -62,7 +62,7 @@ Function Invoke-ExecAccessChecks {
6262
ExchangeTest = ''
6363
}
6464
if ($TenantCheck) {
65-
$Data = @($TenantCheck.Data | ConvertFrom-Json)
65+
$Data = @($TenantCheck.Data | ConvertFrom-Json -ErrorAction Stop)
6666
$TenantResult.GraphStatus = $Data.GraphStatus
6767
$TenantResult.ExchangeStatus = $Data.ExchangeStatus
6868
$TenantResult.GDAPRoles = $Data.GDAPRoles
@@ -85,7 +85,7 @@ Function Invoke-ExecAccessChecks {
8585
$Results = @()
8686
}
8787
} catch {
88-
Write-Host $_.Exception.Message
88+
Write-Warning "Error running tenant access check - $($_.Exception.Message)"
8989
$Results = @()
9090
}
9191
}
@@ -105,7 +105,7 @@ Function Invoke-ExecAccessChecks {
105105
if (!$Request.Query.SkipCache -eq 'true' -or !$Request.Query.SkipCache -eq $true) {
106106
try {
107107
$Cache = Get-CIPPAzDataTableEntity @Table -Filter "RowKey eq 'GDAPRelationships' and Timestamp ge datetime'$TimestampFilter'"
108-
$Results = $Cache.Data | ConvertFrom-Json
108+
$Results = $Cache.Data | ConvertFrom-Json -ErrorAction Stop
109109
} catch {
110110
$Results = $null
111111
}

version_latest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.0
1+
7.5.1

0 commit comments

Comments
 (0)