|
| 1 | +--- |
| 2 | +title: "Get driveProtectionUnitsBulkAdditionJob" |
| 3 | +description: "Get a driveProtectionUnitsBulkAdditionJob in a OneDrive protection policy." |
| 4 | +author: "neminbshah" |
| 5 | +ms.localizationpriority: medium |
| 6 | +ms.subservice: "m365-backup-storage" |
| 7 | +doc_type: apiPageType |
| 8 | +--- |
| 9 | + |
| 10 | +# Get driveProtectionUnitsBulkAdditionJob |
| 11 | + |
| 12 | +Namespace: microsoft.graph |
| 13 | + |
| 14 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 15 | + |
| 16 | +Get a [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object by the ID associated with a [oneDriveForBusinessProtectionPolicy](../resources/onedriveforbusinessprotectionpolicy.md). |
| 17 | + |
| 18 | +[!INCLUDE [national-cloud-support](../../includes/global-only.md)] |
| 19 | + |
| 20 | +## Permissions |
| 21 | + |
| 22 | +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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 23 | + |
| 24 | +<!-- { "blockType": "permissions", "name": "driveprotectionunitsbulkadditionjobs_get" } --> |
| 25 | +[!INCLUDE [permissions-table](../includes/permissions/driveprotectionunitsbulkadditionjobs-get-permissions.md)] |
| 26 | + |
| 27 | +## HTTP request |
| 28 | + |
| 29 | +<!-- { |
| 30 | + "blockType": "ignored" |
| 31 | +} |
| 32 | +--> |
| 33 | + |
| 34 | +``` http |
| 35 | +GET /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/{driveProtectionPolicyId}/driveProtectionUnitsBulkAdditionJobs/{driveProtectionUnitsBulkAdditionJobId} |
| 36 | +``` |
| 37 | + |
| 38 | +## Request headers |
| 39 | + |
| 40 | +|Name|Description| |
| 41 | +|:---|:---| |
| 42 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 43 | + |
| 44 | +## Request body |
| 45 | + |
| 46 | +Don't supply a request body for this method. |
| 47 | + |
| 48 | +## Response |
| 49 | + |
| 50 | +If successful, this method returns a `200 OK` response code and a [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object in the response body. |
| 51 | + |
| 52 | +## Examples |
| 53 | + |
| 54 | +### Request |
| 55 | + |
| 56 | +The following example shows a request. |
| 57 | + |
| 58 | +<!-- { |
| 59 | + "blockType": "request", |
| 60 | + "name": "driveprotectionunitsbulkadditionjobs_get" |
| 61 | +} |
| 62 | +--> |
| 63 | + |
| 64 | +``` http |
| 65 | +GET https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/driveProtectionUnitsBulkAdditionJobs/71633878-8321-4950-bfaf-ed285bdd1461 |
| 66 | +``` |
| 67 | + |
| 68 | +### Response |
| 69 | + |
| 70 | +The following example shows the response. |
| 71 | + |
| 72 | +<!-- { |
| 73 | + "blockType": "response", |
| 74 | + "truncated": true, |
| 75 | + "@odata.type": "microsoft.graph.driveProtectionUnitsBulkAdditionJob" |
| 76 | +} |
| 77 | +--> |
| 78 | + |
| 79 | +``` http |
| 80 | +HTTP/1.1 200 OK |
| 81 | +Content-Location: https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/driveProtectionUnitsBulkAdditionJobs/61633878-8321-4950-bfaf-ed285bdd1461 |
| 82 | +
|
| 83 | +{ |
| 84 | + "@odata.type": "#microsoft.graph.driveProtectionUnitsBulkAdditionJob", |
| 85 | + "id":"61633878-8321-4950-bfaf-ed285bdd1461", |
| 86 | + "displayName" : "drives-I", |
| 87 | + "drives" : ["amala@contoso.com", "conrad@contoso.com", "lothar@contoso.com"], |
| 88 | + "directoryObjectIds": ["71633878-8321-4950-bfaf-ed285bdd1461"], |
| 89 | + "status" : "CompletedWithErrors", |
| 90 | + "createdBy":{ |
| 91 | + "application":{ |
| 92 | + "id":"1fec8e78-bce4-4aaf-ab1b-5451cc387264" |
| 93 | + }, |
| 94 | + "user":{ |
| 95 | + "id":"845457dc-4bb2-4815-bef3-8628ebd1952e" |
| 96 | + } |
| 97 | + }, |
| 98 | + "createdDateTime":"2015-06-19T12-01-03.45Z", |
| 99 | + "lastModifiedBy":{ |
| 100 | + "application":{ |
| 101 | + "id":"1fec8e78-bce4-4aaf-ab1b-5451cc387264" |
| 102 | + }, |
| 103 | + "user":{ |
| 104 | + "id":"845457dc-4bb2-4815-bef3-8628ebd1952e" |
| 105 | + } |
| 106 | + }, |
| 107 | + "lastModifiedDateTime":"2015-06-19T12-01-03.45Z", |
| 108 | + "error":{ |
| 109 | + "code" : "ProtectionResourcesNotFound", |
| 110 | + "message": "Errors while resolving protection resources", |
| 111 | + "details": |
| 112 | + [ |
| 113 | + { |
| 114 | + "code": "EmailNotFound", |
| 115 | + "message": "Email address 'amala@contoso.com' not found in directory", |
| 116 | + "target" : "amala@contoso.com" |
| 117 | + }, |
| 118 | + { |
| 119 | + "code": "EmailNotFound", |
| 120 | + "message": "Email address 'conrad@contoso.com' not found in directory", |
| 121 | + "target" : "conrad@contoso.com" |
| 122 | + }, |
| 123 | + { |
| 124 | + "code": "EmailNotFound", |
| 125 | + "message": "Email address 'lothar@contoso.com' not found in directory", |
| 126 | + "target" : "lothar@contoso.com" |
| 127 | + } |
| 128 | + ] |
| 129 | + } |
| 130 | +} |
| 131 | +``` |
0 commit comments