Edit

Share via


Set-EntraPermissionGrantConditionSet

Update an existing Microsoft Entra ID permission grant condition set.

Syntax

Default (Default)

Set-EntraPermissionGrantConditionSet

    -ConditionSetType <String>
    -Id <String>
    -PolicyId <String>
    [-Permissions <System.Collections.Generic.List`1[System.String]>]
    [-ClientApplicationTenantIds <System.Collections.Generic.List`1[System.String]>]
    [-ClientApplicationIds <System.Collections.Generic.List`1[System.String]>]
    [-ResourceApplication <String>]
    [-PermissionType <String>]
    [-PermissionClassification <String>]
    [-ClientApplicationsFromVerifiedPublisherOnly <Boolean>]
    [-ClientApplicationPublisherIds <System.Collections.Generic.List`1[System.String]>]
    [<CommonParameters>]

Description

Updates a Microsoft Entra ID permission grant condition set object identified by Id.

Examples

Example 1: Update a permission grant condition set to includes permissions that is classified as low

Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant'
$permissionGrantPolicy = Get-EntraPermissionGrantPolicy | Where-Object { $_.Id -eq 'my-custom-consent-policy' }
$conditionSet = Get-EntraPermissionGrantConditionSet -PolicyId $permissionGrantPolicy.Id -ConditionSetType 'includes' | Where-Object { $_.PermissionType -eq 'delegated' }
Set-EntraPermissionGrantConditionSet -PolicyId $permissionGrantPolicy -ConditionSetType 'includes' -Id $conditionSet.Id -PermissionClassification 'low'

This command updates sets the specified permission grant set to classify as low.

  • -PolicyId parameter specifies the unique identifier of a permission grant policy.
  • -ConditionSetType parameter indicates whether the condition sets are included in the policy or excluded.
  • -Id parameter specifies the unique identifier of a permission grant condition set object.
  • -PermissionClassification parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to.

Example 2: Update a permission grant condition set

Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant'
$permissionGrantPolicy = Get-EntraPermissionGrantPolicy | Where-Object { $_.Id -eq 'my-custom-consent-policy' }
$conditionSet = Get-EntraPermissionGrantConditionSet -PolicyId $permissionGrantPolicy.Id -ConditionSetType 'includes' | Where-Object { $_.PermissionType -eq 'delegated' }
$params = @{
    PolicyId                                    = $permissionGrantPolicy.Id
    ConditionSetType                            = 'includes'
    Id                                          = $conditionSet.Id
    PermissionType                              = 'delegated'
    PermissionClassification                    = 'low'
    ResourceApplication                         = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'
    Permissions                                 = @('All')
    ClientApplicationIds                        = @('All')
    ClientApplicationTenantIds                  = @('All')
    ClientApplicationPublisherIds               = @('All')
    ClientApplicationsFromVerifiedPublisherOnly = $true
}

Set-EntraPermissionGrantConditionSet @params

This command updates sets the specified permission grant set.

  • -PolicyId parameter specifies the unique identifier of a permission grant policy.
  • -ConditionSetType parameter indicates whether the condition sets are included in the policy or excluded.
  • -Id parameter specifies the unique identifier of a permission grant condition set object.
  • -PermissionType parameter specifies the type of permissions (application, delegated) to scope consent operation down to.
  • -PermissionClassification parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to.
  • -ResourceApplication parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID.
  • -Permissions parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs.
  • -ClientApplicationIds parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs.
  • -ClientApplicationTenantIds parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs.
  • -ClientApplicationPublisherIds parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs.
  • -ClientApplicationsFromVerifiedPublisherOnly parameter indicates whether to only includes client applications from verified publishers.

Parameters

-ClientApplicationIds

The set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs.

Parameter properties

Type:

System.Collections.Generic.List`1[System.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

-ClientApplicationPublisherIds

The set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs.

Parameter properties

Type:

System.Collections.Generic.List`1[System.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

-ClientApplicationsFromVerifiedPublisherOnly

A value indicates whether to only includes client applications from verified publishers.

Parameter properties

Type:System.Boolean
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

-ClientApplicationTenantIds

The set of client application tenant IDs to scope consent operation down to. It could be @("All") or a list of client application tenant IDs.

Parameter properties

Type:

System.Collections.Generic.List`1[System.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

-ConditionSetType

The value indicates whether the condition sets are included in the policy or excluded.

Parameter properties

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

Parameter sets

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

-Id

The unique identifier of a Microsoft Entra ID permission grant condition set object.

Parameter properties

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

Parameter sets

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

-PermissionClassification

Specific classification (all, low, medium, high) to scope consent operation down to.

Parameter properties

Type:System.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

-Permissions

The identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs.

Parameter properties

Type:

System.Collections.Generic.List`1[System.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

-PermissionType

Specific type of permissions (application, delegated) to scope consent operation down to.

Parameter properties

Type:System.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

-PolicyId

The unique identifier of a Microsoft Entra ID permission grant policy object.

Parameter properties

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

Parameter sets

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

-ResourceApplication

The identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID.

Parameter properties

Type:System.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

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.

Inputs

String