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)
Si elle réussit, cette méthode renvoie un code de réponse 200 OK et un objet deviceConfigurationDeviceStateSummary mis à jour dans le corps de la réponse.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceConfigurationDeviceStateSummary
{
OdataType = "#microsoft.graph.deviceConfigurationDeviceStateSummary",
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.DeviceConfigurationDeviceStateSummaries.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceConfigurationDeviceStateSummary deviceConfigurationDeviceStateSummary = new DeviceConfigurationDeviceStateSummary();
deviceConfigurationDeviceStateSummary.setOdataType("#microsoft.graph.deviceConfigurationDeviceStateSummary");
deviceConfigurationDeviceStateSummary.setUnknownDeviceCount(2);
deviceConfigurationDeviceStateSummary.setNotApplicableDeviceCount(8);
deviceConfigurationDeviceStateSummary.setCompliantDeviceCount(4);
deviceConfigurationDeviceStateSummary.setRemediatedDeviceCount(5);
deviceConfigurationDeviceStateSummary.setNonCompliantDeviceCount(7);
deviceConfigurationDeviceStateSummary.setErrorDeviceCount(0);
deviceConfigurationDeviceStateSummary.setConflictDeviceCount(3);
DeviceConfigurationDeviceStateSummary result = graphClient.deviceManagement().deviceConfigurationDeviceStateSummaries().patch(deviceConfigurationDeviceStateSummary);
# 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_state_summary import DeviceConfigurationDeviceStateSummary
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceConfigurationDeviceStateSummary(
odata_type = "#microsoft.graph.deviceConfigurationDeviceStateSummary",
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_configuration_device_state_summaries.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.