Skip to content

Commit 2602c29

Browse files
committed
switch http function to start orchestrator
1 parent 6599bde commit 2602c29

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ function Invoke-ExecRunTenantGroupRule {
2020

2121
if (-not $Group) { $Body = @{ Results = 'Group not found' } }
2222

23-
$UpdateResult = Update-CIPPDynamicTenantGroups -GroupId $GroupId
24-
$Body = @{ Results = "Dynamic rules executed successfully for group '$($Group.Name)'. Members added: $($UpdateResult.MembersAdded), Members removed: $($UpdateResult.MembersRemoved)" }
23+
$null = Start-TenantDynamicGroupOrchestrator -GroupId $GroupId
24+
25+
$Body = @{ Results = "Dynamic rules executed successfully for group '$($Group.Name)'. Processing will continue in the background. Check the logbook for details." }
2526

2627
return ([HttpResponseContext]@{
2728
StatusCode = [HttpStatusCode]::OK

Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-TenantDynamicGroupOrchestrator.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function Start-TenantDynamicGroupOrchestrator {
2828
$InputObject = [PSCustomObject]@{
2929
OrchestratorName = 'UpdateDynamicTenantGroups'
3030
Batch = @($TenantBatch)
31+
SkipLog = $true
3132
}
3233
if ($PSCmdlet.ShouldProcess('Start-TenantDynamicGroupOrchestrator', 'Starting Tenant Dynamic Group Orchestrator')) {
3334
Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Depth 5 -Compress)

0 commit comments

Comments
 (0)