|
| 1 | +--- |
| 2 | +title: "cloudPCUserSettingsPersistenceDetail: bulkCreateUserProfileSnapshot" |
| 3 | +description: "Trigger a manual snapshot for selected user settings persistence profiles as a long-running operation." |
| 4 | +author: "weicc" |
| 5 | +ms.date: 09/07/2026 |
| 6 | +ms.localizationpriority: medium |
| 7 | +ms.subservice: "cloud-pc" |
| 8 | +doc_type: apiPageType |
| 9 | +--- |
| 10 | + |
| 11 | +# cloudPCUserSettingsPersistenceDetail: bulkCreateUserProfileSnapshot |
| 12 | + |
| 13 | +Namespace: microsoft.graph |
| 14 | + |
| 15 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 16 | + |
| 17 | +Trigger a manual snapshot for selected user settings persistence profiles as a long-running operation. This action is bound to the [cloudPCUserSettingsPersistenceDetail](../resources/cloudpcusersettingspersistencedetail.md) entity. The created snapshots have **snapshotType** set to `manual`. |
| 18 | + |
| 19 | +## Permissions |
| 20 | + |
| 21 | +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). |
| 22 | + |
| 23 | +<!-- { "blockType": "permissions", "name": "cloudpcusersettingspersistencedetail_bulkcreateuserprofilesnapshot_permissions" } --> |
| 24 | +[!INCLUDE [permissions-table](../includes/permissions/cloudpcusersettingspersistencedetail-bulkcreateuserprofilesnapshot-permissions.md)] |
| 25 | + |
| 26 | +## HTTP request |
| 27 | + |
| 28 | +<!-- { "blockType": "ignored" } --> |
| 29 | +``` http |
| 30 | +POST /deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy-id}/assignments/{cloudPcProvisioningPolicyAssignment-id}/userSettingsPersistenceDetail/bulkCreateUserProfileSnapshot |
| 31 | +``` |
| 32 | + |
| 33 | +## Request headers |
| 34 | + |
| 35 | +|Name|Description| |
| 36 | +|:---|:---| |
| 37 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 38 | +|Content-Type|application/json. Required.| |
| 39 | + |
| 40 | +## Request body |
| 41 | + |
| 42 | +In the request body, supply a JSON representation of the parameters. |
| 43 | + |
| 44 | +|Parameter|Type|Description| |
| 45 | +|:---|:---|:---| |
| 46 | +|cloudProfileIds|String collection|Required. Indicates the list of unique identifiers for the user settings persistence profiles to take snapshots for. The collection must contain at least one and at most 50 items. If the collection is empty or contains more than 50 items, the API responds with `400 Bad Request` and error code `invalidCloudProfileIdCount`. Not nullable.| |
| 47 | + |
| 48 | +## Response |
| 49 | + |
| 50 | +If successful, this action returns a `202 Accepted` response code and a [cloudPcUserProfileSnapshotCreateBulkActionResult](../resources/cloudpcuserprofilesnapshotcreatebulkactionresult.md) object in the response body, derived from [cloudPcUserProfileBulkActionResult](../resources/cloudpcuserprofilebulkactionresult.md). |
| 51 | + |
| 52 | +Represents the result of the **bulkCreateUserProfileSnapshot** action. Failed items are cloud profile IDs from the **cloudProfileIds** request parameter. The inherited **totalCount** and **failedCount** properties count cloud profile IDs. |
| 53 | + |
| 54 | +If the collection is empty or contains more than 50 items, the API responds with `400 Bad Request` and error code `invalidCloudProfileIdCount`. |
| 55 | + |
| 56 | +## Examples |
| 57 | + |
| 58 | +### Request |
| 59 | + |
| 60 | +The following example requests snapshots for two profiles. |
| 61 | + |
| 62 | +<!-- { "blockType": "request", "name": "bulkcreate_cloudpcuserprofilesnapshot" } --> |
| 63 | +``` http |
| 64 | +POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/b0c2d35f-3385-46c8-a6f5-6c3dfad7708b/assignments/64ff06de-9c00-4a5a-98b5-7f5abe26bfd9/userSettingsPersistenceDetail/bulkCreateUserProfileSnapshot |
| 65 | +Content-Type: application/json |
| 66 | +
|
| 67 | +{ |
| 68 | + "cloudProfileIds": [ |
| 69 | + "8fd04a0b-ed49-46c0-a62d-e7980d829058", |
| 70 | + "95d04a0b-ed49-46c0-a62d-e7980d829058" |
| 71 | + ] |
| 72 | +} |
| 73 | +``` |
| 74 | + |
| 75 | +### Response |
| 76 | + |
| 77 | +The following response indicates that one profile was rejected during input validation. |
| 78 | + |
| 79 | +<!-- { "blockType": "response", "name": "bulkcreate_cloudpcuserprofilesnapshot", "@odata.type": "microsoft.graph.cloudPcUserProfileSnapshotCreateBulkActionResult" } --> |
| 80 | +``` http |
| 81 | +HTTP/1.1 202 Accepted |
| 82 | +Content-Type: application/json |
| 83 | +
|
| 84 | +{ |
| 85 | + "@odata.type": "#microsoft.graph.cloudPcUserProfileSnapshotCreateBulkActionResult", |
| 86 | + "totalCount": 2, |
| 87 | + "failedCount": 1, |
| 88 | + "failedCloudProfileIds": [ |
| 89 | + "95d04a0b-ed49-46c0-a62d-e7980d829058" |
| 90 | + ] |
| 91 | +} |
| 92 | +``` |
0 commit comments