Skip to content

Latest commit

 

History

History
163 lines (119 loc) · 5.18 KB

File metadata and controls

163 lines (119 loc) · 5.18 KB
title Delete protectionRuleBase
description Delete a protection rule from a protection policy.
author tushar20
ms.reviewer manikantsinghms
ms.localizationpriority medium
ms.subservice m365-backup-storage
doc_type apiPageType
ms.date 06/04/2024

Delete protectionRuleBase

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Delete a protection rule from a protection policy.

You can delete a rule when the state is completed or completedWithErrors. Deleting a protection rule doesn't remove the corresponding protection units from the protection policy.

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

DELETE /solutions/backupRestore/sharePointProtectionPolicies/{sharePointProtectionPolicyId}/siteInclusionRules/{siteProtectionRuleId}
DELETE /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/{oneDriveForBusinessProtectionPolicyId}/driveInclusionRules/{driveProtectionRuleId}
DELETE /solutions/backupRestore/exchangeProtectionPolicies/{exchangeProtectionPolicyId}/mailboxInclusionRules/{mailboxProtectionRuleId}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 204 No Content response code.

Examples

Example 1: Delete a siteInclusionRule associated with a SharePoint protection policy

The following example shows how to delete a siteInclusionRule associated with a sharePointProtectionPolicy.

Request

The following example shows a request.

DELETE https://graph.microsoft.com/beta/solutions/backupRestore/sharePointProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/siteInclusionRules/51633878-8321-4950-bfaf-ed285bdd1461

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

HTTP/1.1 204 No Content

Example 2: Delete a driveInclusionRule associated with an OneDriveForBusiness protection policy

The following example shows how to delete a driveInclusionRule associated with an oneDriveForBusinessProtectionPolicy.

Request

The following example shows a request.

DELETE https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/driveInclusionRules/51633878-8321-4950-bfaf-ed285bdd1461

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

HTTP/1.1 204 No Content

Example 3: Delete a mailboxInclusionRule associated with an Exchange protection policy

The following example shows how to delete a mailboxInclusionRule associated with an exchangeProtectionPolicy.

Request

The following example shows a request.

DELETE https://graph.microsoft.com/beta/solutions/backupRestore/exchangeProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/mailboxInclusionRules/51633878-8321-4950-bfaf-ed285bdd1461

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

HTTP/1.1 204 No Content