Edit

cloudPCUserSettingsPersistenceDetail: bulkCreateUserProfileSnapshot

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.

Trigger a manual snapshot for selected user settings persistence profiles as a long-running operation. This action is bound to the cloudPCUserSettingsPersistenceDetail entity. The created snapshots have snapshotType set to manual.

API availability

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 permission Higher privileged permissions
Delegated (work or school account) CloudPC.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application CloudPC.ReadWrite.All Not available.

HTTP request

POST /deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy-id}/assignments/{cloudPcProvisioningPolicyAssignment-id}/userSettingsPersistenceDetail/bulkCreateUserProfileSnapshot

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, supply a JSON representation of the parameters.

Parameter Type Description
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.

Response

If successful, this action returns a 202 Accepted response code and a cloudPcUserProfileSnapshotCreateBulkActionResult object in the response body, derived from cloudPcUserProfileBulkActionResult.

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.

If the collection is empty or contains more than 50 items, the API responds with 400 Bad Request and error code invalidCloudProfileIdCount.

Examples

Request

The following example requests snapshots for two profiles.

POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/b0c2d35f-3385-46c8-a6f5-6c3dfad7708b/assignments/64ff06de-9c00-4a5a-98b5-7f5abe26bfd9/userSettingsPersistenceDetail/bulkCreateUserProfileSnapshot
Content-Type: application/json

{
  "cloudProfileIds": [
    "8fd04a0b-ed49-46c0-a62d-e7980d829058",
    "95d04a0b-ed49-46c0-a62d-e7980d829058"
  ]
}

Response

The following response indicates that one profile was rejected during input validation.

HTTP/1.1 202 Accepted
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.cloudPcUserProfileSnapshotCreateBulkActionResult",
  "totalCount": 2,
  "failedCount": 1,
  "failedCloudProfileIds": [
    "95d04a0b-ed49-46c0-a62d-e7980d829058"
  ]
}