manifests/collectors/Identity/ConditionalAccess.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Identity/ConditionalAccess.ps1 (AB#5660). # Field expressions are copied verbatim from the original collector and evaluate in an # equivalent scope -- see docs/design/decisions/declarative-collectors.md. # Review before trusting; regenerate rather than hand-patch if the source collector changes. # @{ ResourceTypes = @( 'entra/conditionalaccesspolicies' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $data = $1.properties # Users included/excluded $usersIncluded = '' $usersExcluded = '' if ($data.conditions.users) { if ($data.conditions.users.includeUsers) { $usersIncluded = ($data.conditions.users.includeUsers -join ', ') } if ($data.conditions.users.excludeUsers) { $usersExcluded = ($data.conditions.users.excludeUsers -join ', ') } } # Applications $appsIncluded = '' $appsExcluded = '' if ($data.conditions.applications) { if ($data.conditions.applications.includeApplications) { $appsIncluded = ($data.conditions.applications.includeApplications -join ', ') } if ($data.conditions.applications.excludeApplications) { $appsExcluded = ($data.conditions.applications.excludeApplications -join ', ') } } $platforms = if ($data.conditions.platforms) { $data.conditions.platforms | ConvertTo-Json -Depth 20 -Compress } else { '' } $locations = if ($data.conditions.locations) { $data.conditions.locations | ConvertTo-Json -Depth 20 -Compress } else { '' } $conditionsJson = if ($data.conditions) { $data.conditions | ConvertTo-Json -Depth 30 -Compress } else { '' } # Grant controls $grantControls = '' if ($data.grantControls) { if ($data.grantControls.builtInControls) { $grantControls = ($data.grantControls.builtInControls -join ', ') } } $grantControlsJson = if ($data.grantControls) { $data.grantControls | ConvertTo-Json -Depth 20 -Compress } else { '' } # Session controls $sessionControls = '' if ($data.sessionControls) { $scParts = @() if ($data.sessionControls.signInFrequency) { $scParts += 'SignInFrequency' } if ($data.sessionControls.persistentBrowser) { $scParts += 'PersistentBrowser' } if ($data.sessionControls.cloudAppSecurity) { $scParts += 'CloudAppSecurity' } if ($data.sessionControls.applicationEnforcedRestrictions) { $scParts += 'AppEnforcedRestrictions' } $sessionControls = ($scParts -join ', ') } $sessionControlsJson = if ($data.sessionControls) { $data.sessionControls | ConvertTo-Json -Depth 20 -Compress } else { '' } '@ AdditionalRowLoops = @() TagLoop = $null Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Tenant ID' Expression = '$1.tenantId' } @{ Name = 'Display Name' Expression = '$data.displayName' } @{ Name = 'State' Expression = '$data.state' } @{ Name = 'Users Included' Expression = '$usersIncluded' } @{ Name = 'Users Excluded' Expression = '$usersExcluded' } @{ Name = 'Apps Included' Expression = '$appsIncluded' } @{ Name = 'Apps Excluded' Expression = '$appsExcluded' } @{ Name = 'Platforms' Expression = '$platforms' } @{ Name = 'Locations' Expression = '$locations' } @{ Name = 'Grant Controls' Expression = '$grantControls' } @{ Name = 'Grant Controls JSON' Expression = '$grantControlsJson' } @{ Name = 'Session Controls' Expression = '$sessionControls' } @{ Name = 'Session Controls JSON' Expression = '$sessionControlsJson' } @{ Name = 'Conditions JSON' Expression = '$conditionsJson' } @{ Name = 'Created DateTime' Expression = '$data.createdDateTime' } @{ Name = 'Modified DateTime' Expression = '$data.modifiedDateTime' } @{ Name = 'Resource U' Expression = '$ResUCount' } ) Export = @{ WorksheetName = 'Conditional Access' TableNamePrefix = 'CATable_' Columns = @( 'Display Name' 'State' 'Users Included' 'Users Excluded' 'Apps Included' 'Apps Excluded' 'Platforms' 'Locations' 'Grant Controls' 'Grant Controls JSON' 'Session Controls' 'Session Controls JSON' 'Conditions JSON' 'Created DateTime' 'Modified DateTime' 'Resource U' ) TagColumns = @() TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @( 'New-ConditionalText disabled -Range D:D' 'New-ConditionalText enabledForReportingButNotEnforced -Range D:D' ) } SourceCollector = 'Modules/Public/InventoryModules/Identity/ConditionalAccess.ps1' } |