Summary
Add owner getters at the asset and asset-account level, parallel to the existing Get-SafeguardAssetPartitionOwner.
Motivation
Ownership in SPP can be assigned at the partition, asset, and account level. The module only exposes the partition tier (Get-/Add-/Remove-SafeguardAssetPartitionOwner). To read who owns an individual asset or account you have to pull the object's ManagedBy collection via the field-selection trick:
Invoke-SafeguardMethod Core GET Assets -Parameters @{ fields = 'Id,ManagedBy' }
Invoke-SafeguardMethod Core GET AssetAccounts -Parameters @{ fields = 'Id,ManagedBy' }
ManagedBy is not populated on the normal Get-SafeguardAsset / Get-SafeguardAssetAccount output unless you request it explicitly with fields, which is undiscoverable.
Proposed API
Get-SafeguardAssetOwner [-AssetToGet] <object> [-Fields <string[]>]
Get-SafeguardAssetAccountOwner [-AssetToGet] <object> [-AccountToGet] <object> [-Fields <string[]>]
Each returns the owner principals (the ManagedBy set) for the asset / account.
Current workaround
Raw GET Assets / GET AssetAccounts with fields=Id,ManagedBy.
Summary
Add owner getters at the asset and asset-account level, parallel to the existing
Get-SafeguardAssetPartitionOwner.Motivation
Ownership in SPP can be assigned at the partition, asset, and account level. The module only exposes the partition tier (
Get-/Add-/Remove-SafeguardAssetPartitionOwner). To read who owns an individual asset or account you have to pull the object'sManagedBycollection via the field-selection trick:ManagedByis not populated on the normalGet-SafeguardAsset/Get-SafeguardAssetAccountoutput unless you request it explicitly withfields, which is undiscoverable.Proposed API
Each returns the owner principals (the
ManagedByset) for the asset / account.Current workaround
Raw
GET Assets/GET AssetAccountswithfields=Id,ManagedBy.