Edit

Share via


Get-EntraBetaPrivilegedResource

Get Microsoft Entra ID privileged resource.

Syntax

GetQuery (Default)

Get-EntraBetaPrivilegedResource

    -ProviderId <String>
    [-Top <Int32>]
    [-Filter <String>]
    [-Property <String[]>]
    [<CommonParameters>]

GetById

Get-EntraBetaPrivilegedResource

    -ProviderId <String>
    -Id <String>
    [-Property <String[]>]
    [<CommonParameters>]

Description

The Get-EntraBetaPrivilegedResource cmdlet get Microsoft Entra ID privileged resource.

Examples

Example 1: Get all resources

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
Get-EntraBetaPrivilegedResource -ProviderId 'aadRoles'
Id                                   DisplayName ExternalId                                                RegisteredDateTime RegisteredRoot Status Type
--                                   ----------- ----------                                                ------------------ -------------- ------ ----
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AdminUnitName         /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb                                  Active administrativeUnits

This example demonstrates how to retrieve all resources for aadRoles provider.

  • -ProviderId Parameter specifies the ID of the specific provider.

Example 2: Get a specific privileged resource

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
    Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'
}
Get-EntraBetaPrivilegedResource @params
Id                                   DisplayName ExternalId                                                RegisteredDateTime RegisteredRoot Status Type
--                                   ----------- ----------                                                ------------------ -------------- ------ ----
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AdminUnitName         /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb                                  Active administrativeUnits

This example retrieves a resource for aadRoles provider with ID aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb.

  • -ProviderId Parameter specifies the ID of the specific provider.
  • -Id Parameter specifies the unique identifier of the specific resource.

Example 3: Get a specific privileged resource by filter

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
    Filter = "DisplayName eq 'AdminUnitName'"
}
Get-EntraBetaPrivilegedResource @params
Id                                   DisplayName ExternalId                                                RegisteredDateTime RegisteredRoot Status Type
--                                   ----------- ----------                                                ------------------ -------------- ------ ----
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AdminUnitName         /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb                                  Active administrativeUnits

This example retrieves a resource for aadRoles provider Filter.

  • -ProviderId Parameter specifies the ID of the specific provider.

Example 4: Get top privileged resources

Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
}
Get-EntraBetaPrivilegedResource @params -Top 1
Id                                   DisplayName ExternalId                                                RegisteredDateTime RegisteredRoot Status Type
--                                   ----------- ----------                                                ------------------ -------------- ------ ----
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Test         /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb                                  Active administrativeUnits

This example retrieves top resources for aadRoles provider. You can use -Limit as an alias for -Top.

  • -ProviderId Parameter specifies the ID of the specific provider.

Parameters

-Filter

Specifies an OData v4.0 filter statement. This parameter controls which objects are returned.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetQuery
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Id

The unique identifier of the specific resource.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetById
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Property

Specifies properties to be returned.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Select

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProviderId

The unique identifier of the specific provider.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Top

The top result count.

Parameter properties

Type:System.Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Limit

Parameter sets

GetQuery
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

Outputs

System.Object