Edit

Share via


Get-EntraBetaPrivilegedRoleSetting

Get role settings.

Syntax

GetQuery (Default)

Get-EntraBetaPrivilegedRoleSetting

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

GetById

Get-EntraBetaPrivilegedRoleSetting

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

Description

The Get-EntraBetaPrivilegedRoleSetting cmdlet gets role settings from Microsoft Entra ID.

Examples

Example 1: Get role settings for a specific provider and resource

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
    Filter = "ResourceId eq 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'"
}
Get-EntraBetaPrivilegedRoleSetting @params
Id                                   IsDefault LastUpdatedBy     LastUpdatedDateTime ResourceId                           RoleDefinitionId
--                                   --------- -------------     ------------------- ----------                           ----------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False     MG_graph_auth     06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888
bbbbbbbb-1111-2222-3333-cccccccccccc False     MG_graph_auth     26/07/2024 12:28:15 11112222-bbbb-3333-cccc-4444dddd5555 55556666-ffff-7777-aaaa-8888bbbb9999

This example retrieves role settings for a specific provider and resource.

  • -ProviderId Parameter specifies the ID of the specific provider.
  • In, -Filter parameter ResourceId specifies the ID of the specific resource.

Example 2: Get a role setting for a specific provider and Id

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
    Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'
}
Get-EntraBetaPrivilegedRoleSetting @params
Id                                   IsDefault LastUpdatedBy     LastUpdatedDateTime ResourceId                           RoleDefinitionId
--                                   --------- -------------     ------------------- ----------                           ----------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False     MG_graph_auth     06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888

This example retrieves role settings for a specific provider and Id.

  • -ProviderId Parameter specifies the ID of the specific provider.
  • -Id Parameter specifies the ID of the specific role setting.

Example 3: Get role settings for a specific provider and resource

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
    Filter = "ResourceId eq 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'"
}
Get-EntraBetaPrivilegedRoleSetting @params -Top 1
Id                                   IsDefault LastUpdatedBy     LastUpdatedDateTime ResourceId                           RoleDefinitionId
--                                   --------- -------------     ------------------- ----------                           ----------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False     MG_graph_auth     06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888

This example retrieves a top one specific role setting. You can use -Limit as an alias for -Top.

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

Example 4: Get role settings with Filter query

Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup'
$params = @{
    ProviderId = 'aadRoles'
    Filter = "ResourceId eq 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' and LastUpdatedBy  eq 'MOD Administrator'"
}
Get-EntraBetaPrivilegedRoleSetting @params
Id                                   IsDefault LastUpdatedBy     LastUpdatedDateTime ResourceId                           RoleDefinitionId
--                                   --------- -------------     ------------------- ----------                           ----------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False     MG_graph_auth     06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888

This example retrieves role settings for a specific provider and resource.

  • -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: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 role setting.

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

System. Nullable`1

Outputs

System.Object