Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Obtenez l’action à distance status rapports, y compris des données telles que l’ID du PC cloud, le nom d’affichage de l’appareil PC cloud, le nom principal de l’utilisateur initial, le nom d’utilisateur principal du propriétaire de l’appareil, l’action entreprise et l’état de l’action.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetActionStatusReports;
var requestBody = new GetActionStatusReportsPostRequestBody
{
Filter = "ActionState eq 'failed'",
Select = new List<string>
{
"Id",
"CloudPcDeviceDisplayName",
"BulkActionId",
"BulkActionDisplayName",
"CloudPcId",
"InitiatedByUserPrincipalName",
"DeviceOwnerUserPrincipalName",
"Action",
"ActionState",
"RequestDateTime",
"LastUpdatedDateTime",
"ActionParameters",
},
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.Reports.GetActionStatusReports.PostAsync(requestBody);
// 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.reports.getactionstatusreports.GetActionStatusReportsPostRequestBody getActionStatusReportsPostRequestBody = new com.microsoft.graph.beta.devicemanagement.virtualendpoint.reports.getactionstatusreports.GetActionStatusReportsPostRequestBody();
getActionStatusReportsPostRequestBody.setFilter("ActionState eq 'failed'");
LinkedList<String> select = new LinkedList<String>();
select.add("Id");
select.add("CloudPcDeviceDisplayName");
select.add("BulkActionId");
select.add("BulkActionDisplayName");
select.add("CloudPcId");
select.add("InitiatedByUserPrincipalName");
select.add("DeviceOwnerUserPrincipalName");
select.add("Action");
select.add("ActionState");
select.add("RequestDateTime");
select.add("LastUpdatedDateTime");
select.add("ActionParameters");
getActionStatusReportsPostRequestBody.setSelect(select);
getActionStatusReportsPostRequestBody.setSkip(0);
getActionStatusReportsPostRequestBody.setTop(50);
graphClient.deviceManagement().virtualEndpoint().reports().getActionStatusReports().post(getActionStatusReportsPostRequestBody);
# 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.reports.get_action_status_reports.get_action_status_reports_post_request_body import GetActionStatusReportsPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetActionStatusReportsPostRequestBody(
filter = "ActionState eq 'failed'",
select = [
"Id",
"CloudPcDeviceDisplayName",
"BulkActionId",
"BulkActionDisplayName",
"CloudPcId",
"InitiatedByUserPrincipalName",
"DeviceOwnerUserPrincipalName",
"Action",
"ActionState",
"RequestDateTime",
"LastUpdatedDateTime",
"ActionParameters",
],
skip = 0,
top = 50,
)
await graph_client.device_management.virtual_endpoint.reports.get_action_status_reports.post(request_body)