Share via


Test-AccountPermissions

Validates that the account has the correct permissions to run diagnostic commands.

Syntax

Default (Default)

Test-AccountPermissions
    [[-TenantId] <String>]
    [[-Endpoint] <PPEndpoint>]
    [-ForceAuth]
    [<CommonParameters>]

Description

The Test-AccountPermissions cmdlet tests that the generated bearer token for the signed in account has the claim that's necessary to call the diagnostic APIs. The necessary permission is the Power Platform administrator role, which is assigned through the Microsoft Entra ID portal.

Examples

EXAMPLE 1

Test-AccountPermissions

Validates that the signed-in account has the Power Platform Administrator role using default settings.

EXAMPLE 2

Test-AccountPermissions -Endpoint usgovhigh

Validates account permissions for an environment in the US Government High cloud.

Parameters

-Endpoint

The Power Platform endpoint to connect to. Defaults to 'prod'.

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:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceAuth

Force re-authentication to Azure.

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

-TenantId

The id of the tenant that the environment belongs to.

Parameter properties

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

Parameter sets

(All)
Position:1
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

Whether the account has the required permissions.