Edit

Create siteExclusionUnitsBulkAdditionJob

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.

Create a site exclusion units bulk addition job for a SharePoint protection policy.

The initial status upon creation of the job is active. When all the sites specified in the siteWebUrls property are added to the corresponding SharePoint protection policy as exclusion units, the status of the job is completed. If any failures occur, the status of the job is completedWithErrors.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

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

POST /solutions/backupRestore/sharePointProtectionPolicies/{sharePointProtectionPolicyId}/siteExclusionUnitsBulkAdditionJobs

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, include a JSON representation of the siteExclusionUnitsBulkAdditionJob object.

Property Type Description
displayName String The display name of the bulk addition job. Required.
siteWebUrls String collection The URLs of SharePoint sites to be added as exclusion units. Required.

Response

If successful, this method returns a 201 Created response code and a siteExclusionUnitsBulkAdditionJob object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/solutions/backupRestore/sharePointProtectionPolicies/845457dc-4bb2-4815-bef3-8628ebd1952e/siteExclusionUnitsBulkAdditionJobs
Content-Type: application/json

{
  "displayName": "Bulk exclude archived sites",
  "siteWebUrls": [
    "https://contoso.sharepoint.com/sites/Marketing",
    "https://contoso.sharepoint.com/sites/Sales",
    "https://contoso.sharepoint.com/sites/Archives"
  ]
}

Response

The following example shows the response.

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#solutions/backupRestore/sharePointProtectionPolicies('845457dc-4bb2-4815-bef3-8628ebd1952e')/siteExclusionUnitsBulkAdditionJobs/$entity",
  "id": "4b014d8c-71fe-4d00-a01a-31850bc5b32c",
  "displayName": "Bulk exclude archived sites",
  "status": "active",
  "siteWebUrls": [
    "https://contoso.sharepoint.com/sites/Marketing",
    "https://contoso.sharepoint.com/sites/Sales",
    "https://contoso.sharepoint.com/sites/Archives"
  ],
  "createdDateTime": "2026-02-16T14:00:00Z",
  "lastModifiedDateTime": "2026-02-16T14:00:00Z",
  "createdBy": {
    "user": {
      "id": "845457dc-4bb2-4815-bef3-8628ebd1952e"
    }
  },
  "lastModifiedBy": {
    "user": {
      "id": "845457dc-4bb2-4815-bef3-8628ebd1952e"
    }
  }
}