manifests/collectors/Identity/ServicePrincipals.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Identity/ServicePrincipals.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/serviceprincipals' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $data = $1.properties # Get nearest key credential expiry $keyExpiry = $null if ($data.keyCredentials) { $keyExpiry = ($data.keyCredentials | Sort-Object endDateTime | Select-Object -First 1).endDateTime } # Get nearest password credential expiry $passwordExpiry = $null if ($data.passwordCredentials) { $passwordExpiry = ($data.passwordCredentials | Sort-Object endDateTime | Select-Object -First 1).endDateTime } $tagList = '' if ($data.tags) { $tagList = ($data.tags -join ', ') } '@ AdditionalRowLoops = @() TagLoop = $null Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Tenant ID' Expression = '$1.tenantId' } @{ Name = 'Display Name' Expression = '$data.displayName' } @{ Name = 'Application ID' Expression = '$data.appId' } @{ Name = 'Service Principal Type' Expression = '$data.servicePrincipalType' } @{ Name = 'Account Enabled' Expression = '$data.accountEnabled' } @{ Name = 'App Owner Organization ID' Expression = '$data.appOwnerOrganizationId' } @{ Name = 'Key Credential Expiry' Expression = '$keyExpiry' } @{ Name = 'Password Credential Expiry' Expression = '$passwordExpiry' } @{ Name = 'Tags' Expression = '$tagList' } @{ Name = 'Resource U' Expression = '$ResUCount' } ) Export = @{ WorksheetName = 'Service Principals' TableNamePrefix = 'SPsTable_' Columns = @( 'Display Name' 'Application ID' 'Service Principal Type' 'Account Enabled' 'App Owner Organization ID' 'Key Credential Expiry' 'Password Credential Expiry' 'Tags' 'Resource U' ) TagColumns = @() TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @( 'New-ConditionalText False -Range F:F' ) } SourceCollector = 'Modules/Public/InventoryModules/Identity/ServicePrincipals.ps1' } |