Remove-PPRBACRoleAssignment

Removes a Power Platform role-based access control (RBAC) role assignment.

Syntax

TenantScope (Default)

Remove-PPRBACRoleAssignment
    -RoleAssignmentId <String>
    -TenantId <String>
    [-ClientId <String>]
    [-Endpoint <PPEndpoint>]
    [-ForceAuth]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

EnvironmentScope

Remove-PPRBACRoleAssignment
    -RoleAssignmentId <String>
    -TenantId <String>
    -EnvironmentId <String>
    [-ClientId <String>]
    [-Endpoint <PPEndpoint>]
    [-ForceAuth]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

EnvironmentGroupScope

Remove-PPRBACRoleAssignment
    -RoleAssignmentId <String>
    -TenantId <String>
    -EnvironmentGroupId <String>
    [-ClientId <String>]
    [-Endpoint <PPEndpoint>]
    [-ForceAuth]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

This cmdlet removes a role assignment by its ID. The scope can be at the tenant, environment, or environment group level.

If -ClientId isn't specified, the cmdlet uses the cached ClientId from a previous call to New-PPAuthorizationApplication or any Power Platform RBAC cmdlet that was given -ClientId explicitly. When -ClientId is provided, it's stored in the cache for future use.

Returns $true if the role assignment was deleted, $false if it wasn't found.

Examples

EXAMPLE 1

Remove-PPRBACRoleAssignment -ClientId "00000000-0000-0000-0000-000000000000" -RoleAssignmentId "00000000-0000-0000-0000-000000000001" -TenantId "00000000-0000-0000-0000-000000000002"

Removes a tenant-scoped role assignment.

EXAMPLE 2

Remove-PPRBACRoleAssignment -ClientId "00000000-0000-0000-0000-000000000000" -RoleAssignmentId "00000000-0000-0000-0000-000000000001" -TenantId "00000000-0000-0000-0000-000000000002" -EnvironmentId "00000000-0000-0000-0000-000000000003"

Removes an environment-scoped role assignment.

EXAMPLE 3

Remove-PPRBACRoleAssignment -ClientId "00000000-0000-0000-0000-000000000000" -RoleAssignmentId "00000000-0000-0000-0000-000000000001" -TenantId "00000000-0000-0000-0000-000000000002" -EnvironmentGroupId "00000000-0000-0000-0000-000000000004"

Removes an environment group-scoped role assignment.

Parameters

-ClientId

The application (client) ID of the app registration

Parameter properties

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

Parameter sets

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

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

-Endpoint

The BAP endpoint to connect to

Parameter properties

Type:PPEndpoint
Default value:Prod
Accepted values:unknown, tip1, tip2, prod, usgovhigh, dod, china
Supports wildcards:False
DontShow:False

Parameter sets

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

-EnvironmentGroupId

The environment group ID for environment group-scoped role assignments

Parameter properties

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

Parameter sets

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

-EnvironmentId

The environment ID for environment-scoped role assignments

Parameter properties

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

Parameter sets

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

-Force

Remove the role assignment without prompting for confirmation

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-ForceAuth

Force re-authentication instead of reusing existing session

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-RoleAssignmentId

The ID of the role assignment to remove

Parameter properties

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

Parameter sets

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

-TenantId

The Azure AD tenant ID

Parameter properties

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

Parameter sets

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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.

Outputs

System.Boolean

Returns $true if the role assignment was deleted, $false if it wasn't found.