File tree Expand file tree Collapse file tree
Modules/CIPPCore/Public/Standards Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,14 +119,19 @@ function Invoke-CIPPStandardEnableAppConsentRequests {
119119 }
120120 }
121121 if ($Settings.report -eq $true ) {
122+ # Set default if no roles are selected, matches remediation logic
123+ $RolesToAdd = $Settings.ReviewerRoles.value
124+ if (! $RolesToAdd -or $RolesToAdd.Count -eq 0 ) {
125+ $RolesToAdd = @ (' 62e90394-69f5-4237-9190-012177145e10' )
126+ }
122127
123128 $CurrentValue = [PSCustomObject ]@ {
124129 EnableAppConsentRequests = [bool ]$CurrentInfo.isEnabled
125130 ReviewerCount = $CurrentInfo.reviewers.count
126131 }
127132 $ExpectedValue = [PSCustomObject ]@ {
128133 EnableAppConsentRequests = $true
129- ReviewerCount = ( $Settings .ReviewerRoles.value ).count
134+ ReviewerCount = $RolesToAdd .Count
130135 }
131136
132137 Set-CIPPStandardsCompareField - FieldName ' standards.EnableAppConsentRequests' - CurrentValue $CurrentValue - ExpectedValue $ExpectedValue - TenantFilter $Tenant
You can’t perform that action at this time.
0 commit comments