// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceCompliancePolicyDeviceStateSummary
{
OdataType = "#microsoft.graph.deviceCompliancePolicyDeviceStateSummary",
InGracePeriodCount = 2,
ConfigManagerCount = 2,
UnknownDeviceCount = 2,
NotApplicableDeviceCount = 8,
CompliantDeviceCount = 4,
RemediatedDeviceCount = 5,
NonCompliantDeviceCount = 7,
ErrorDeviceCount = 0,
ConflictDeviceCount = 3,
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceCompliancePolicyDeviceStateSummary.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceCompliancePolicyDeviceStateSummary deviceCompliancePolicyDeviceStateSummary = new DeviceCompliancePolicyDeviceStateSummary();
deviceCompliancePolicyDeviceStateSummary.setOdataType("#microsoft.graph.deviceCompliancePolicyDeviceStateSummary");
deviceCompliancePolicyDeviceStateSummary.setInGracePeriodCount(2);
deviceCompliancePolicyDeviceStateSummary.setConfigManagerCount(2);
deviceCompliancePolicyDeviceStateSummary.setUnknownDeviceCount(2);
deviceCompliancePolicyDeviceStateSummary.setNotApplicableDeviceCount(8);
deviceCompliancePolicyDeviceStateSummary.setCompliantDeviceCount(4);
deviceCompliancePolicyDeviceStateSummary.setRemediatedDeviceCount(5);
deviceCompliancePolicyDeviceStateSummary.setNonCompliantDeviceCount(7);
deviceCompliancePolicyDeviceStateSummary.setErrorDeviceCount(0);
deviceCompliancePolicyDeviceStateSummary.setConflictDeviceCount(3);
DeviceCompliancePolicyDeviceStateSummary result = graphClient.deviceManagement().deviceCompliancePolicyDeviceStateSummary().patch(deviceCompliancePolicyDeviceStateSummary);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_compliance_policy_device_state_summary import DeviceCompliancePolicyDeviceStateSummary
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceCompliancePolicyDeviceStateSummary(
odata_type = "#microsoft.graph.deviceCompliancePolicyDeviceStateSummary",
in_grace_period_count = 2,
config_manager_count = 2,
unknown_device_count = 2,
not_applicable_device_count = 8,
compliant_device_count = 4,
remediated_device_count = 5,
non_compliant_device_count = 7,
error_device_count = 0,
conflict_device_count = 3,
)
result = await graph_client.device_management.device_compliance_policy_device_state_summary.patch(request_body)