New-PPAuthorizationApplication

Creates or updates an Microsoft Entra ID application registration and service principal for Power Platform authorization.

Syntax

Default (Default)

New-PPAuthorizationApplication
    [-DisplayName] <String>
    [-TenantId] <String>
    [[-Endpoint] <PPEndpoint>]
    [-Update]
    [-ForceAuth]
    [<CommonParameters>]

Description

This cmdlet creates a public client application (app registration) and its associated service principal in Microsoft Entra ID with the required API permissions for Power Platform authorization operations. The application is configured as a single-tenant app with delegated permissions for Authorization.RoleAssignments.Read and Authorization.RoleAssignments.Write.

If an application with the specified display name already exists, the cmdlet prompts you to use Test-PPAuthorizationApplication to verify the configuration, or use the -Update switch to update the existing application with the required settings.

Admin consent is NOT granted automatically. A tenant administrator must grant consent before the application can be used.

Examples

EXAMPLE 1

New-PPAuthorizationApplication -DisplayName "MyAuthorizationApp" -TenantId "12345678-1234-1234-1234-123456789012"

Creates a new app registration and service principal named "MyAuthorizationApp".

EXAMPLE 2

New-PPAuthorizationApplication -DisplayName "MyAuthorizationApp" -TenantId "12345678-1234-1234-1234-123456789012" -Update

Updates an existing app registration named "MyAuthorizationApp" with the required permissions.

EXAMPLE 3

New-PPAuthorizationApplication -DisplayName "MyAuthorizationApp" -TenantId "12345678-1234-1234-1234-123456789012" -Endpoint usgovhigh

Creates a new app registration and service principal for the US Government High cloud.

Parameters

-DisplayName

The display name for the application registration

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

-Update

Update an existing application with the required configuration

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

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.String

Returns the Application (client) ID of the created or updated application.