Edit

Share via


Add-EntraBetaApplicationPolicy

Adds an application policy.

Syntax

ByApplicationIdAndPolicyId

Add-EntraBetaApplicationPolicy

    -Id <String>
    -RefObjectId <String>
    [<CommonParameters>]

Description

The Add-EntraBetaApplicationPolicy cmdlet adds a Microsoft Entra ID application policy. Specify Id and RefObjectId parameters to add an application policy.

Examples

Example 1: Add an application policy

Connect-Entra -Scopes 'Application.ReadWrite.All, Policy.ReadWrite.ApplicationConfiguration'
$params = @{
    Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'
    RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc'
}
Add-EntraBetaApplicationPolicy @params

This example demonstrates how to add an application policy.

Parameters

-Id

The ID of the application for which you need to set the policy.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ObjectId, ApplicationId

Parameter sets

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

-RefObjectId

Specifies the ID of the policy.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:PolicyId

Parameter sets

(All)
Position:Named
Mandatory:True
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.