Для вызова этого API требуется одно из следующих разрешений. Дополнительные сведения, включая сведения о том, как выбрать разрешения, см. в статье Разрешения.
Тип разрешения
Разрешения (в порядке повышения привилегий)
Делегированные (рабочая или учебная учетная запись)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceConfigurationDeviceOverview
{
OdataType = "#microsoft.graph.deviceConfigurationDeviceOverview",
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.DeviceConfigurations["{deviceConfiguration-id}"].DeviceStatusOverview.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceConfigurationDeviceOverview deviceConfigurationDeviceOverview = new DeviceConfigurationDeviceOverview();
deviceConfigurationDeviceOverview.setOdataType("#microsoft.graph.deviceConfigurationDeviceOverview");
deviceConfigurationDeviceOverview.setPendingCount(12);
deviceConfigurationDeviceOverview.setNotApplicableCount(2);
deviceConfigurationDeviceOverview.setSuccessCount(12);
deviceConfigurationDeviceOverview.setErrorCount(10);
deviceConfigurationDeviceOverview.setFailedCount(11);
OffsetDateTime lastUpdateDateTime = OffsetDateTime.parse("2016-12-31T23:58:21.6459442-08:00");
deviceConfigurationDeviceOverview.setLastUpdateDateTime(lastUpdateDateTime);
deviceConfigurationDeviceOverview.setConfigurationVersion(4);
DeviceConfigurationDeviceOverview result = graphClient.deviceManagement().deviceConfigurations().byDeviceConfigurationId("{deviceConfiguration-id}").deviceStatusOverview().patch(deviceConfigurationDeviceOverview);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_configuration_device_overview import DeviceConfigurationDeviceOverview
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceConfigurationDeviceOverview(
odata_type = "#microsoft.graph.deviceConfigurationDeviceOverview",
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_configurations.by_device_configuration_id('deviceConfiguration-id').device_status_overview.patch(request_body)
Ниже приведен пример отклика. Примечание. Представленный здесь объект отклика может быть усечен для краткости. При фактическом вызове будут возвращены все свойства.