L’une des autorisations suivantes est nécessaire pour appeler cette API. Pour plus d’informations, notamment sur la façon de choisir les autorisations, voir Autorisations.
Type d’autorisation
Autorisations (de celle qui offre le plus de privilèges à celle qui en offre le moins)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceComplianceUserOverview
{
OdataType = "#microsoft.graph.deviceComplianceUserOverview",
PendingCount = 12,
NotApplicableCount = 2,
SuccessCount = 12,
ErrorCount = 10,
FailedCount = 11,
LastUpdateDateTime = DateTimeOffset.Parse("2016-12-31T23:58:21.6459442-08:00"),
ConfigurationVersion = 4,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceCompliancePolicies["{deviceCompliancePolicy-id}"].UserStatusOverview.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceComplianceUserOverview deviceComplianceUserOverview = new DeviceComplianceUserOverview();
deviceComplianceUserOverview.setOdataType("#microsoft.graph.deviceComplianceUserOverview");
deviceComplianceUserOverview.setPendingCount(12);
deviceComplianceUserOverview.setNotApplicableCount(2);
deviceComplianceUserOverview.setSuccessCount(12);
deviceComplianceUserOverview.setErrorCount(10);
deviceComplianceUserOverview.setFailedCount(11);
OffsetDateTime lastUpdateDateTime = OffsetDateTime.parse("2016-12-31T23:58:21.6459442-08:00");
deviceComplianceUserOverview.setLastUpdateDateTime(lastUpdateDateTime);
deviceComplianceUserOverview.setConfigurationVersion(4);
DeviceComplianceUserOverview result = graphClient.deviceManagement().deviceCompliancePolicies().byDeviceCompliancePolicyId("{deviceCompliancePolicy-id}").userStatusOverview().patch(deviceComplianceUserOverview);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_compliance_user_overview import DeviceComplianceUserOverview
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceComplianceUserOverview(
odata_type = "#microsoft.graph.deviceComplianceUserOverview",
pending_count = 12,
not_applicable_count = 2,
success_count = 12,
error_count = 10,
failed_count = 11,
last_update_date_time = "2016-12-31T23:58:21.6459442-08:00",
configuration_version = 4,
)
result = await graph_client.device_management.device_compliance_policies.by_device_compliance_policy_id('deviceCompliancePolicy-id').user_status_overview.patch(request_body)
Voici un exemple de réponse. Remarque : l’objet de réponse illustré ici peut être tronqué à des fins de concision. Toutes les propriétés sont renvoyées à partir d’un appel réel.