The Update-MgIdentityConditionalAccessPolicy cmdlet modifies the settings of an existing conditional access policy in Microsoft Entra ID. Conditional access policies define the rules that govern how users and devices can access organizational resources, such as requiring MFA and restricting access from specific locations. With this cmdlet, admins can update policy conditions, grant or block controls, and session settings as business needs evolve.
This article shows you how to update conditional access policies using both the Microsoft Entra admin center and Microsoft Graph PowerShell:
The Entra admin center provides a graphical interface to adjust conditional access policies:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Policy.ReadWrite.ConditionalAccess"
Run the script below by adding the policy's ID to modify the properties:
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId $policyId -BodyParameter $params ""
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId "policy-id" -State "enabled"
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId "policy-id" -Conditions @{Users = @{IncludeGroups = @("group-id")}} -GrantControls @{BuiltInControls = @("mfa")}
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId "policy-id" -State "disabled"
The following essential parameters can be used along with the Update-MgIdentityConditionalAccessPolicy cmdlet.
| Parameter | Description |
|---|---|
| -ConditionalAccessPolicyId | ID of the policy to update (required). |
| -DisplayName | New display name for the policy. |
| -State | State of the policy (enabled, disabled, reportOnly). |
| -Conditions | Hashtable with new conditions for assignments. |
| -GrantControls | Hashtable for new grant controls. |
| -SessionControls | Set session controls. |
| -Description | Policy description. |
| -WhatIf | Simulates the update. |
| -Confirm | Prompts before updating. |
| -Headers | Custom HTTP headers. |
Although powerful, relying solely on Microsoft Graph PowerShell and Entra ID admin centre can present challenges:
ADManager Plus, an identity governance and administration solution with comprehensive Microsoft Entra ID management and reporting capabilities, simplifies complex admin tasks from a single, user-friendly console: