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)
Déléguée (compte professionnel ou scolaire)
DeviceManagementConfiguration.ReadWrite.All
Déléguée (compte Microsoft personnel)
Non prise en charge.
Application
DeviceManagementConfiguration.ReadWrite.All
Requête HTTP
POST /deviceManagement/deviceCompliancePolicySettingStateSummaries
Définition de la plateforme. Les valeurs possibles sont les suivantes : android, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile et all.
// 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://zcusa.951200.xyz/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://zcusa.951200.xyz/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)
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.