Skip to content

[Feature Request] Add Get-SafeguardAssetOwner and Get-SafeguardAssetAccountOwner #641

Description

@DanPeterson

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions