Skip to content

Commit 1e361e8

Browse files
authored
Merge pull request #509 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents e2b462d + 0370ba1 commit 1e361e8

16 files changed

+105
-9
lines changed

CIPPTimers.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
"Priority": 5,
106106
"RunOnProcessor": true
107107
},
108+
{
109+
"Id": "0967c860-3a57-4860-8f33-e5136eae7b4e",
110+
"Command": "Start-TenantDynamicGroupOrchestrator",
111+
"Description": "Orchestrator to update dynamic tenant groups",
112+
"Cron": "0 0 */4 * * *",
113+
"Priority": 6,
114+
"RunOnProcessor": true
115+
},
108116
{
109117
"Id": "4ca242d0-8dc8-4256-b0ed-186599f4233f",
110118
"Command": "Start-UpdateTokensTimer",
@@ -206,4 +214,4 @@
206214
"RunOnProcessor": true,
207215
"IsSystem": true
208216
}
209-
]
217+
]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
function Push-UpdateDynamicTenantGroup {
2+
<#
3+
.SYNOPSIS
4+
Push an update to a Dynamic Tenant Group
5+
.FUNCTIONALITY
6+
Entrypoint
7+
#>
8+
9+
[CmdletBinding()]
10+
param ($Item)
11+
12+
Write-Information "Pushing update to Dynamic Tenant Group: $($Item.Name) (ID: $($Item.Id))"
13+
Update-CIPPDynamicTenantGroups -GroupId $Item.Id
14+
}

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/Invoke-ListLogs.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function Invoke-ListLogs {
5858
$PartitionKey = $Request.Query.DateFilter
5959
$username = $Request.Query.User ?? '*'
6060
$TenantFilter = $Request.Query.Tenant
61+
$ApiFilter = $Request.Query.API
6162

6263
$StartDate = $Request.Query.StartDate ?? $Request.Query.DateFilter
6364
$EndDate = $Request.Query.EndDate ?? $Request.Query.DateFilter
@@ -87,7 +88,8 @@ function Invoke-ListLogs {
8788
$Rows = Get-AzDataTableEntity @Table -Filter $Filter | Where-Object {
8889
$_.Severity -in $LogLevel -and
8990
$_.Username -like $username -and
90-
($TenantFilter -eq $null -or $TenantFilter -eq 'AllTenants' -or $_.Tenant -like "*$TenantFilter*" -or $_.TenantID -eq $TenantFilter)
91+
($TenantFilter -eq $null -or $TenantFilter -eq 'AllTenants' -or $_.Tenant -like "*$TenantFilter*" -or $_.TenantID -eq $TenantFilter) -and
92+
($ApiFilter -eq $null -or $_.API -match "$ApiFilter")
9193
}
9294

9395
if ($AllowedTenants -notcontains 'AllTenants') {
@@ -122,8 +124,8 @@ function Invoke-ListLogs {
122124
}
123125

124126
return [HttpResponseContext]@{
125-
StatusCode = [HttpStatusCode]::OK
126-
Body = @($ReturnedLog | Sort-Object -Property DateTime -Descending)
127-
}
127+
StatusCode = [HttpStatusCode]::OK
128+
Body = @($ReturnedLog | Sort-Object -Property DateTime -Descending)
129+
}
128130

129131
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function Start-AuditLogOrchestrator {
22
<#
33
.SYNOPSIS
44
Start the Audit Log Polling Orchestrator
5+
6+
.FUNCTIONALITY
7+
Entrypoint
58
#>
69
[CmdletBinding(SupportsShouldProcess = $true)]
710
param()

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function Start-AuditLogProcessingOrchestrator {
22
<#
33
.SYNOPSIS
44
Start the Audit Log Processing Orchestrator
5+
6+
.FUNCTIONALITY
7+
Entrypoint
58
#>
69
[CmdletBinding(SupportsShouldProcess = $true)]
710
param()

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function Start-AuditLogSearchCreation {
22
<#
33
.SYNOPSIS
44
Start the Audit Log Searches
5+
6+
.FUNCTIONALITY
7+
Entrypoint
58
#>
69
[CmdletBinding(SupportsShouldProcess = $true)]
710
param()

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function Start-DriftStandardsOrchestrator {
22
<#
33
.SYNOPSIS
44
Start the Drift Standards Orchestrator
5+
6+
.FUNCTIONALITY
7+
Entrypoint
58
#>
69
[CmdletBinding(SupportsShouldProcess = $true)]
710
param()

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function Start-SchedulerOrchestrator {
22
<#
33
.SYNOPSIS
44
Start the Scheduler Orchestrator
5+
6+
.FUNCTIONALITY
7+
Entrypoint
58
#>
69
[CmdletBinding(SupportsShouldProcess = $true)]
710
param()

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function Start-StandardsOrchestrator {
22
<#
33
.SYNOPSIS
44
Start the Standards Orchestrator
5+
6+
.FUNCTIONALITY
7+
Entrypoint
58
#>
69
[CmdletBinding(SupportsShouldProcess = $true)]
710
param()

0 commit comments

Comments
 (0)