Remove-EntraConditionalAccessPolicy

Deletes a conditional access policy in Microsoft Entra ID by Id.

Syntax

Remove-EntraConditionalAccessPolicy
      -PolicyId <String>
      [<CommonParameters>]

Description

This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id.

Conditional access policies are custom rules that define an access scenario.

Examples

Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId

Connect-Entra -Scopes 'Policy.Read.All'
$policy = Get-EntraConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'}
Remove-EntraConditionalAccessPolicy -PolicyId $policy.ObjectId

This command deletes a conditional access policy in Microsoft Entra ID.

  • -PolicyId parameter specifies the Id of a conditional access policy.

Parameters

-PolicyId

Specifies the policy Id of a conditional access policy in Microsoft Entra ID.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False