manifests/collectors/Identity/AppRegistrations.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Identity/AppRegistrations.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/applications' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $data = Get-AZSCSafeProperty -InputObject $1 -Path 'properties' # Get nearest key credential expiry $keyExpiry = $null if (Get-AZSCSafeProperty -InputObject $data -Path 'keyCredentials') { $keyExpiry = Get-AZSCSafeProperty -InputObject $data -Path 'keyCredentials' -Enumerate | ForEach-Object { Get-AZSCSafeProperty -InputObject $_ -Path 'endDateTime' } | Where-Object { $_ } | Sort-Object | Select-Object -First 1 } # Get nearest password credential expiry $passwordExpiry = $null if (Get-AZSCSafeProperty -InputObject $data -Path 'passwordCredentials') { $passwordExpiry = Get-AZSCSafeProperty -InputObject $data -Path 'passwordCredentials' -Enumerate | ForEach-Object { Get-AZSCSafeProperty -InputObject $_ -Path 'endDateTime' } | Where-Object { $_ } | Sort-Object | Select-Object -First 1 } $permissionCount = 0 if (Get-AZSCSafeProperty -InputObject $data -Path 'requiredResourceAccess') { $permissionCount = @(Get-AZSCSafeProperty -InputObject $data -Path 'requiredResourceAccess' -Enumerate).Count } '@ AdditionalRowLoops = @() TagLoop = $null Fields = @( @{ Name = 'ID' Expression = 'Get-AZSCSafeProperty -InputObject $1 -Path ''id''' } @{ Name = 'Tenant ID' Expression = 'Get-AZSCSafeProperty -InputObject $1 -Path ''tenantId''' } @{ Name = 'Display Name' Expression = 'Get-AZSCSafeProperty -InputObject $data -Path ''displayName''' } @{ Name = 'Application ID' Expression = 'Get-AZSCSafeProperty -InputObject $data -Path ''appId''' } @{ Name = 'Sign-In Audience' Expression = 'Get-AZSCSafeProperty -InputObject $data -Path ''signInAudience''' } @{ Name = 'Key Credential Expiry' Expression = '$keyExpiry' } @{ Name = 'Password Credential Expiry' Expression = '$passwordExpiry' } @{ Name = 'API Permission Count' Expression = '$permissionCount' } @{ Name = 'Publisher Domain' Expression = 'Get-AZSCSafeProperty -InputObject $data -Path ''publisherDomain''' } @{ Name = 'Created DateTime' Expression = 'Get-AZSCSafeProperty -InputObject $data -Path ''createdDateTime''' } @{ Name = 'Resource U' Expression = '$ResUCount' } ) Export = @{ WorksheetName = 'App Registrations' TableNamePrefix = 'AppRegsTable_' Columns = @( 'Display Name' 'Application ID' 'Sign-In Audience' 'Key Credential Expiry' 'Password Credential Expiry' 'API Permission Count' 'Publisher Domain' 'Created DateTime' 'Resource U' ) TagColumns = @() TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @() } SourceCollector = 'Modules/Public/InventoryModules/Identity/AppRegistrations.ps1' } |