Skip to content

Latest commit

 

History

History
130 lines (96 loc) · 4.59 KB

File metadata and controls

130 lines (96 loc) · 4.59 KB
title cloudPC: retrieveCloudPcCountByStatus
description Retrieve the Cloud PC count grouped by status.
author ziqifu9527
ms.localizationpriority medium
ms.subservice cloud-pc
doc_type apiPageType
ms.date 06/05/2025

cloudPC: retrieveCloudPcCountByStatus

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Retrieve the Cloud PC count grouped by status.

[!INCLUDE national-cloud-support]

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.

[!INCLUDE permissions-table]

HTTP request

GET /deviceManagement/virtualEndpoint/cloudPCs/retrieveCloudPcCountByStatus?customFilter={customFilter}

Function parameters

In the request URL, provide the following parameter with a valid value.

Parameter Type Description
customFilter String Tailors responses in the same way as the $filter query parameter. For more information about how to use the $filter query parameter to filter a collection of objects, see Use the $filter query parameter.

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 200 OK response code and a collection of cloudPcStatusSummary objects in the response body.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudPCs/retrieveCloudPcCountByStatus?customFilter=contains(tolower(managedDeviceName), 'a') or contains(tolower(imageDisplayName), 'a') or contains(tolower(userPrincipalName), 'a')

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.cloudPcStatusSummary)",
  "value": [
    {
      "status": "provisioned",
      "count": 22
    },
    {
      "status": "failed",
      "count": 11
    }
  ]
}