Test-PPAuthorizationApplication

Tests that a Microsoft Entra ID application is correctly configured for Power Platform authorization.

Syntax

Default (Default)

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

Description

This cmdlet validates that a Microsoft Entra ID application registration exists and is properly configured for Power Platform authorization operations. It checks:

  • The application exists in Microsoft Entra ID.
  • The application has the required API permissions configured (Authorization.RoleAssignments.Read and Write).
  • The application is configured as a public client
  • The application has http://localhost configured as a redirect URI.

Examples

EXAMPLE 1

Test-PPAuthorizationApplication -ClientId "00000000-0000-0000-0000-000000000001" -TenantId "12345678-1234-1234-1234-123456789012"

Tests that the application is correctly configured for the prod endpoint.

EXAMPLE 2

Test-PPAuthorizationApplication -ClientId "00000000-0000-0000-0000-000000000001" -TenantId "12345678-1234-1234-1234-123456789012" -Endpoint tip1

Tests that the application is correctly configured for the TIP1 endpoint.

Parameters

-ClientId

The Application (client) ID of the Azure AD application

Parameter properties

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

Parameter sets

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

-Endpoint

The BAP endpoint to validate against

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:3
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

-TenantId

The Azure AD tenant ID

Parameter properties

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

Parameter sets

(All)
Position:2
Mandatory:True
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 application is correctly configured, $false otherwise.