Skip to content

Commit 38f8f40

Browse files
committed
Add logging for tenant group evaluation
Introduced a Write-LogMessage call to log the evaluation of tenants for each group, improving traceability and debugging of dynamic tenant group conditions.
1 parent bc55aed commit 38f8f40

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/CIPPCore/Public/TenantGroups/Update-CIPPDynamicTenantGroups.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ function Update-CIPPDynamicTenantGroups {
198198
$LogicOperator = if ($Group.RuleLogic -eq 'or') { ' -or ' } else { ' -and ' }
199199
$WhereString = $WhereConditions -join $LogicOperator
200200
Write-Information "Evaluating tenants with condition: $WhereString"
201+
Write-LogMessage -API 'TenantGroups' -message "Evaluating tenants for group '$($Group.Name)' with condition: $WhereString" -sev Info
201202

202203
$ScriptBlock = [ScriptBlock]::Create($WhereString)
203204
$MatchingTenants = $TenantObj | Where-Object $ScriptBlock

0 commit comments

Comments
 (0)