cloudPcReports: getInaccessibleCloudPcReports

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.

Get inaccessible Cloud PCs with details, including the latest health state, failed connection count, failed health check count, and system status. An inaccessible Cloud PC represents a Cloud PC that is in an unavailable state (at least one of the health checks failed) or has consecutive user connections failure.

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) CloudPC.Read.All CloudPC.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application CloudPC.Read.All CloudPC.ReadWrite.All

HTTP request

POST /deviceManagement/virtualEndpoint/reports/getInaccessibleCloudPcReports

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the parameters.

The following table shows the parameters that can be used with this method.

Parameter Type Description
filter String OData $filter syntax. Only and, or, gt ,ge and eq are currently supported.
select String collection OData $select syntax. Represents the selected columns of the reports.
search String Specifies a String to search for.
groupBy String collection Specifies how to group the reports. If used, must have the same content as the select parameter.
orderBy String collection Specifies how to sort the reports.
skip Int32 Number of records to skip.
top Int32 The number of top records to return.

Response

If successful, this method returns a 200 OK response code and a Stream object in the response body.

Examples

Request

The following is an example of a request.

POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/reports/getInaccessibleCloudPcReports
Content-Type: application/json
Content-length: 199

{
  "filter": "region eq 'westus2'",
  "orderBy": [
    "cloudPcId"
  ],
  "select": [
    "cloudPcId",
    "aadDeviceId",
    "cloudPcName",
    "userPrincipalName",
    "provisioningStatus",
    "region",
    "deviceHealthStatus",
    "deviceHealthStatusDateTime",
    "recentDeviceHealthFailureCount",
    "recentConnectionFailureCount",
    "systemStatus",
    "systemStatusDateTime"
  ],
  "top": 10,
  "skip": 0
}

Response

The following example shows the response.

HTTP/1.1 200 OK
Content-Type: application/octet-stream

{
  "TotalRowCount": 2,
  "Schema": [
    {
      "Column": "cloudPcId",
      "PropertyType": "String"
    },
    {
      "Column": "aadDeviceId",
      "PropertyType": "String"
    },
    {
      "Column": "cloudPcName",
      "PropertyType": "String"
    },
    {
      "Column": "userPrincipalName",
      "PropertyType": "String"
    },
    {
      "Column": "provisioningStatus",
      "PropertyType": "String"
    },
    {
      "Column": "region",
      "PropertyType": "String"
    },
    {
      "Column": "deviceHealthStatus",
      "PropertyType": "String"
    },
    {
      "Column": "deviceHealthStatusDateTime",
      "PropertyType": "DateTime"
    },
    {
      "Column": "recentDeviceHealthFailureCount",
      "PropertyType": "Int32"
    },
    {
      "Column": "recentConnectionFailureCount",
      "PropertyType": "Int64"
    },
    {
      "Column": "systemStatus",
      "PropertyType": "String"
    },
    {
      "Column": "systemStatusDateTime",
      "PropertyType": "DateTime"
    }
  ],
  "Values": [
    [
      "04e279c5-b228-4700-93c3-6f1339c7c86d",
      "a8f78191-8e43-4165-9191-16867d372161",
      "CPC-test1-VGTEK",
      "bob@fabrikam.com",
      "Provisioned",
      "westus2",
      "ErrorVMNotRunning",
      "2023-06-26T03:55:04",
      3,
      0,
      "",
      null
    ],
    [
      "818ff73d-9764-4412-ad99-fc65a396daf3",
      "daefef60-a912-4180-a5c0-f607e346878f",
      "CPC-test2-C84W3",
      "megan@fabrikam.com",
      "Provisioned",
      "westus2",
      "ErrorVMNotRunning",
      "2023-06-26T04:03:49",
      3,
      0,
      "",
      null
    ]
  ]
}