// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceCompliancePolicySettingStateSummary
{
OdataType = "#microsoft.graph.deviceCompliancePolicySettingStateSummary",
Setting = "Setting value",
SettingName = "Setting Name value",
PlatformType = PolicyPlatformType.IOS,
UnknownDeviceCount = 2,
NotApplicableDeviceCount = 8,
CompliantDeviceCount = 4,
RemediatedDeviceCount = 5,
NonCompliantDeviceCount = 7,
ErrorDeviceCount = 0,
ConflictDeviceCount = 3,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceCompliancePolicySettingStateSummaries.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceCompliancePolicySettingStateSummary deviceCompliancePolicySettingStateSummary = new DeviceCompliancePolicySettingStateSummary();
deviceCompliancePolicySettingStateSummary.setOdataType("#microsoft.graph.deviceCompliancePolicySettingStateSummary");
deviceCompliancePolicySettingStateSummary.setSetting("Setting value");
deviceCompliancePolicySettingStateSummary.setSettingName("Setting Name value");
deviceCompliancePolicySettingStateSummary.setPlatformType(PolicyPlatformType.IOS);
deviceCompliancePolicySettingStateSummary.setUnknownDeviceCount(2);
deviceCompliancePolicySettingStateSummary.setNotApplicableDeviceCount(8);
deviceCompliancePolicySettingStateSummary.setCompliantDeviceCount(4);
deviceCompliancePolicySettingStateSummary.setRemediatedDeviceCount(5);
deviceCompliancePolicySettingStateSummary.setNonCompliantDeviceCount(7);
deviceCompliancePolicySettingStateSummary.setErrorDeviceCount(0);
deviceCompliancePolicySettingStateSummary.setConflictDeviceCount(3);
DeviceCompliancePolicySettingStateSummary result = graphClient.deviceManagement().deviceCompliancePolicySettingStateSummaries().post(deviceCompliancePolicySettingStateSummary);
# 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_setting_state_summary import DeviceCompliancePolicySettingStateSummary
from msgraph.generated.models.policy_platform_type import PolicyPlatformType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceCompliancePolicySettingStateSummary(
odata_type = "#microsoft.graph.deviceCompliancePolicySettingStateSummary",
setting = "Setting value",
setting_name = "Setting Name value",
platform_type = PolicyPlatformType.IOS,
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_setting_state_summaries.post(request_body)
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.