From 1c63f4f64946b7385ee85a0f16c35815ee4b6132 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 25 Feb 2025 13:11:17 -0500 Subject: [PATCH] handle no tenants on list --- .../HTTP Functions/CIPP/Settings/Invoke-ExecAccessChecks.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecAccessChecks.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecAccessChecks.ps1 index 4568e389f721..8df5f7fe9c37 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecAccessChecks.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecAccessChecks.ps1 @@ -75,6 +75,10 @@ Function Invoke-ExecAccessChecks { } catch { $LastRun = $null } + + if (!$Results) { + $Results = @() + } } catch { Write-Host $_.Exception.Message $Results = @()