Delete protectionRuleBase

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

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.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) BackupRestore-Configuration.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application BackupRestore-Configuration.ReadWrite.All Not available.

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

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

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

Response

The following example shows the response.

HTTP/1.1 204 No Content