Microsoft Entra ID
General

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.

  1. 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 @params
    
  2. Add "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 @params
    

    Repeat this step to add more "exclude" condition sets.

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…