名前空間: microsoft.graph
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
ユーザーがクラウド PC デバイスにサインインするために使用するクライアント アプリケーションを含む、クラウド PC の使用状況に関する関連 レポート を取得します。
Windows 用リモート デスクトップ クライアント スタンドアロン インストーラー (MSI) は、2026 年 3 月 27 日にサポートが終了します。 その日より前に、IT 管理者はユーザーを Windows アプリに移行して、Azure Virtual Desktop、Windows 365、および Microsoft Dev Box を介してリモート リソースに継続的にアクセスできるようにする必要があります。 Windows のサポート終了に向けたリモート デスクトップ クライアントの準備について詳しくは、こちらをご覧ください。
この API を使用すると、IT 管理者は、ユーザーが従来のリモート デスクトップ クライアントを引き続き使用しているかどうかを確認し、最後のサインイン日を特定することで移行状態を確認できるため、進行状況を監視し、移行要件に準拠していることを確認するのに役立ちます。
API の可用性
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
✅ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
CloudPC.ReadWrite.All |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
CloudPC.ReadWrite.All |
注意事項なし。 |
HTTP 要求
POST /deviceManagement/virtualEndpoint/report/retrieveCloudPcClientAppUsageReport
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、パラメーターの JSON 表現を指定します。
次の表は、このメソッドで使用できるパラメーターを示しています。
| パラメーター |
型 |
説明 |
| filter |
文字列 |
OData $filter 構文。 サポートされているフィルターは、 and、 or、 lt、 le、 gt、 ge、 eq です。 省略可能。 |
| groupBy |
String collection |
レポートをグループ化する方法を指定します。 使用する場合は、 select パラメーターと同じ内容である必要があります。 省略可能。 |
| orderBy |
String collection |
レポートの並べ替えの方法を指定します。 省略可能。 |
| reportType |
cloudPcClientAppUsageReportType |
レポートの種類。 サポートされている値は microsoftRemoteDesktopClientUsageReport です。 必須です。 |
| search |
文字列 |
検索する文字列を指定します。 省略可能。 |
| select |
String collection |
OData $select 構文。 レポートの選択された列。 省略可能。 |
| skip |
Int32 |
スキップするレコードの数。 省略可能。 |
| top |
Int32 |
返される上位レコードの数。 省略可能。 |
応答
成功した場合、このメソッドは応答本文で 200 OK 応答コードと Stream オブジェクトを返します。
次の表では、応答のスキーマについて説明します。
| 列 |
種類 |
説明 |
| UPN |
文字列 |
ユーザー プリンシパル名。 |
| LastSignOn |
文字列 |
従来のリモート デスクトップ クライアントを使用してユーザーが最後にサインインした日付。 形式は YYYY-MM-DD で、常に UTC 時刻です。 |
| DaysWithUsage |
文字列 |
過去 28 日間にユーザーが従来のリモート デスクトップ クライアントを使用してサインインした合計日数。UTC 時刻を使用して計算されます。 |
例
要求
次の例は要求を示しています。
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/report/retrieveCloudPcClientAppUsageReport
Content-Type: application/json
{
"filter": "",
"reportType":"microsoftRemoteDesktopClientUsageReport",
"select": ["UPN", "LastSignOn", "DaysWithUsage"],
"search": "",
"skip": 0,
"top": 50
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Report.RetrieveCloudPcClientAppUsageReport;
using Microsoft.Graph.Beta.Models;
var requestBody = new RetrieveCloudPcClientAppUsageReportPostRequestBody
{
Filter = "",
ReportType = CloudPcClientAppUsageReportType.MicrosoftRemoteDesktopClientUsageReport,
Select = new List<string>
{
"UPN",
"LastSignOn",
"DaysWithUsage",
},
Search = "",
Skip = 0,
Top = 50,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.DeviceManagement.VirtualEndpoint.Report.RetrieveCloudPcClientAppUsageReport.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphdevicemanagement "github.com/microsoftgraph/msgraph-beta-sdk-go/devicemanagement"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphdevicemanagement.NewRetrieveCloudPcClientAppUsageReportPostRequestBody()
filter := ""
requestBody.SetFilter(&filter)
reportType := graphmodels.MICROSOFTREMOTEDESKTOPCLIENTUSAGEREPORT_CLOUDPCCLIENTAPPUSAGEREPORTTYPE
requestBody.SetReportType(&reportType)
select := []string {
"UPN",
"LastSignOn",
"DaysWithUsage",
}
requestBody.SetSelect(select)
search := ""
requestBody.SetSearch(&search)
skip := int32(0)
requestBody.SetSkip(&skip)
top := int32(50)
requestBody.SetTop(&top)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.DeviceManagement().VirtualEndpoint().Report().RetrieveCloudPcClientAppUsageReport().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.devicemanagement.virtualendpoint.report.retrievecloudpcclientappusagereport.RetrieveCloudPcClientAppUsageReportPostRequestBody retrieveCloudPcClientAppUsageReportPostRequestBody = new com.microsoft.graph.beta.devicemanagement.virtualendpoint.report.retrievecloudpcclientappusagereport.RetrieveCloudPcClientAppUsageReportPostRequestBody();
retrieveCloudPcClientAppUsageReportPostRequestBody.setFilter("");
retrieveCloudPcClientAppUsageReportPostRequestBody.setReportType(CloudPcClientAppUsageReportType.MicrosoftRemoteDesktopClientUsageReport);
LinkedList<String> select = new LinkedList<String>();
select.add("UPN");
select.add("LastSignOn");
select.add("DaysWithUsage");
retrieveCloudPcClientAppUsageReportPostRequestBody.setSelect(select);
retrieveCloudPcClientAppUsageReportPostRequestBody.setSearch("");
retrieveCloudPcClientAppUsageReportPostRequestBody.setSkip(0);
retrieveCloudPcClientAppUsageReportPostRequestBody.setTop(50);
graphClient.deviceManagement().virtualEndpoint().report().retrieveCloudPcClientAppUsageReport().post(retrieveCloudPcClientAppUsageReportPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const stream = {
filter: '',
reportType: 'microsoftRemoteDesktopClientUsageReport',
select: ['UPN', 'LastSignOn', 'DaysWithUsage'],
search: '',
skip: 0,
top: 50
};
await client.api('/deviceManagement/virtualEndpoint/report/retrieveCloudPcClientAppUsageReport')
.version('beta')
.post(stream);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\Report\RetrieveCloudPcClientAppUsageReport\RetrieveCloudPcClientAppUsageReportPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\CloudPcClientAppUsageReportType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RetrieveCloudPcClientAppUsageReportPostRequestBody();
$requestBody->setFilter('');
$requestBody->setReportType(new CloudPcClientAppUsageReportType('microsoftRemoteDesktopClientUsageReport'));
$requestBody->setSelect(['UPN', 'LastSignOn', 'DaysWithUsage', ]);
$requestBody->setSearch('');
$requestBody->setSkip(0);
$requestBody->setTop(50);
$graphServiceClient->deviceManagement()->virtualEndpoint()->report()->retrieveCloudPcClientAppUsageReport()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.devicemanagement.virtualendpoint.report.retrieve_cloud_pc_client_app_usage_report.retrieve_cloud_pc_client_app_usage_report_post_request_body import RetrieveCloudPcClientAppUsageReportPostRequestBody
from msgraph_beta.generated.models.cloud_pc_client_app_usage_report_type import CloudPcClientAppUsageReportType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RetrieveCloudPcClientAppUsageReportPostRequestBody(
filter = "",
report_type = CloudPcClientAppUsageReportType.MicrosoftRemoteDesktopClientUsageReport,
select = [
"UPN",
"LastSignOn",
"DaysWithUsage",
],
search = "",
skip = 0,
top = 50,
)
await graph_client.device_management.virtual_endpoint.report.retrieve_cloud_pc_client_app_usage_report.post(request_body)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/octet-stream
{
"TotalRowCount": 3,
"Schema": [
{
"Column": "UPN",
"PropertyType": "String"
},
{
"Column": "LastSignOn",
"PropertyType": "String"
},
{
"Column": "DaysWithUsage",
"PropertyType": "Int64"
}
],
"Values" :[
["test001@contoso.onmicrosoft.com", "2025-10-28", 10],
["test002@contoso.onmicrosoft.com", "2025-10-30", 5],
["test003@contoso.onmicrosoft.com", "2025-10-31", 19]
]
}