File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Scheduler Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,11 @@ Function Invoke-ListScheduledItems {
4949 }
5050
5151 $AllowedTenants = Test-CIPPAccess - Request $Request - TenantList
52+
5253 if ($AllowedTenants -notcontains ' AllTenants' ) {
53- $Tasks = $Tasks | Where-Object - Property TenantId -In $AllowedTenants
54+ $TenantList = Get-Tenants - IncludeErrors | Select-Object customerId, defaultDomainName
55+ $AllowedTenantDomains = $TenantList | Where-Object - Property customerId -In $AllowedTenants | Select-Object - ExpandProperty defaultDomainName
56+ $Tasks = $Tasks | Where-Object - Property Tenant -In $AllowedTenantDomains
5457 }
5558 $ScheduledTasks = foreach ($Task in $tasks ) {
5659 if ($Task.Parameters ) {
You can’t perform that action at this time.
0 commit comments