Manage App Consent Policies
In brief
The examples now define cmdlet parameters in `$params` hashtables before creating custom consent policies and configuring inclusions or exclusions.
What Entra admins need to know
Administrators copying these examples should use the updated hashtable syntax.
This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.
Documentation change
The comparison below shows only the changed extract. Use the full-page view for complete context.
Create a new empty app consent policy.
New-MgPolicyPermissionGrantPolicy ` -Id$params = @{ Id = "my-custom-policy"` -DisplayNameDisplayName = "My first custom consent policy"` -DescriptionDescription = "This is a sample custom app consent policy." } New-MgPolicyPermissionGrantPolicy @paramsAdd "include" condition sets. -PermissionType "delegated"
-PermissionClassification "low"-ClientApplicationsFromVerifiedPublisherOnly $params = @{ PermissionGrantPolicyId = "my-custom-policy" PermissionType = "delegated" PermissionClassification = "low" ClientApplicationsFromVerifiedPublisherOnly = $true }New-MgPolicyPermissionGrantPolicyInclude @params
Repeat this step to add more "include" condition sets. -PermissionGrantPolicyId "my-custom-policy" ` -PermissionType "delegated" ` -ResourceApplication $azureApi.AppId $params = @{ PermissionGrantPolicyId = "my-custom-policy" PermissionType = "delegated" ResourceApplication = $azureApi.AppId } New-MgPolicyPermissionGrantPolicyExclude @paramsRepeat this step to add more "exclude" condition sets.
@@ -121,10 +121,13 @@ Follow these steps to create a custom app consent policy: 1. Create a new empty app consent policy. ```powershell- New-MgPolicyPermissionGrantPolicy `- -Id "my-custom-policy" `- -DisplayName "My first custom consent policy" `- -Description "This is a sample custom app consent policy."+ $params = @{+ Id = "my-custom-policy"+ DisplayName = "My first custom consent policy"+ Description = "This is a sample custom app consent policy."+ }+ + New-MgPolicyPermissionGrantPolicy @params ``` 1. Add "include" condition sets.@@ -136,6 +139,14 @@ Follow these steps to create a custom app consent policy: -PermissionType "delegated" ` -PermissionClassification "low" ` -ClientApplicationsFromVerifiedPublisherOnly+ $params = @{+ PermissionGrantPolicyId = "my-custom-policy"+ PermissionType = "delegated"+ PermissionClassification = "low"+ ClientApplicationsFromVerifiedPublisherOnly = $true+ }++ New-MgPolicyPermissionGrantPolicyInclude @params ``` Repeat this step to add more "include" condition sets.@@ -151,6 +162,13 @@ Follow these steps to create a custom app consent policy: -PermissionGrantPolicyId "my-custom-policy" ` -PermissionType "delegated" ` -ResourceApplication $azureApi.AppId+ $params = @{+ PermissionGrantPolicyId = "my-custom-policy"+ PermissionType = "delegated"+ ResourceApplication = $azureApi.AppId+ }++ New-MgPolicyPermissionGrantPolicyExclude @params ``` Repeat this step to add more "exclude" condition sets. 