Update settingStateDeviceSummary
Article
11/30/2023
11 contributors
Feedback
In this article
Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a settingStateDeviceSummary object.
This API is available in the following national cloud deployments .
Global service
US Government L4
US Government L5 (DOD)
China operated by 21Vianet
✅
✅
✅
✅
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
DeviceManagementConfiguration.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
DeviceManagementConfiguration.ReadWrite.All
HTTP Request
PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}/deviceSettingStateSummaries/{settingStateDeviceSummaryId}
PATCH /deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicyId}/deviceSettingStateSummaries/{settingStateDeviceSummaryId}
Request body
In the request body, supply a JSON representation for the settingStateDeviceSummary object.
The following table shows the properties that are required when you create the settingStateDeviceSummary .
Property
Type
Description
id
String
Key of the entity.
settingName
String
Name of the setting
instancePath
String
Name of the InstancePath for the setting
unknownDeviceCount
Int32
Device Unkown count for the setting
notApplicableDeviceCount
Int32
Device Not Applicable count for the setting
compliantDeviceCount
Int32
Device Compliant count for the setting
remediatedDeviceCount
Int32
Device Compliant count for the setting
nonCompliantDeviceCount
Int32
Device NonCompliant count for the setting
errorDeviceCount
Int32
Device error count for the setting
conflictDeviceCount
Int32
Device conflict error count for the setting
Response
If successful, this method returns a 200 OK
response code and an updated settingStateDeviceSummary object in the response body.
Example
Request
Here is an example of the request.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations/{deviceConfigurationId}/deviceSettingStateSummaries/{settingStateDeviceSummaryId}
Content-type: application/json
Content-length: 360
{
"@odata.type": "#microsoft.graph.settingStateDeviceSummary",
"settingName": "Setting Name value",
"instancePath": "Instance Path value",
"unknownDeviceCount": 2,
"notApplicableDeviceCount": 8,
"compliantDeviceCount": 4,
"remediatedDeviceCount": 5,
"nonCompliantDeviceCount": 7,
"errorDeviceCount": 0,
"conflictDeviceCount": 3
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SettingStateDeviceSummary
{
OdataType = "#microsoft.graph.settingStateDeviceSummary",
SettingName = "Setting Name value",
InstancePath = "Instance Path value",
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.DeviceConfigurations["{deviceConfiguration-id}"].DeviceSettingStateSummaries["{settingStateDeviceSummary-id}"].PatchAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc device-management device-configurations device-setting-state-summaries patch --device-configuration-id {deviceConfiguration-id} --setting-state-device-summary-id {settingStateDeviceSummary-id} --body '{\
"@odata.type": "#microsoft.graph.settingStateDeviceSummary",\
"settingName": "Setting Name value",\
"instancePath": "Instance Path value",\
"unknownDeviceCount": 2,\
"notApplicableDeviceCount": 8,\
"compliantDeviceCount": 4,\
"remediatedDeviceCount": 5,\
"nonCompliantDeviceCount": 7,\
"errorDeviceCount": 0,\
"conflictDeviceCount": 3\
}\
'
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewSettingStateDeviceSummary()
settingName := "Setting Name value"
requestBody.SetSettingName(&settingName)
instancePath := "Instance Path value"
requestBody.SetInstancePath(&instancePath)
unknownDeviceCount := int32(2)
requestBody.SetUnknownDeviceCount(&unknownDeviceCount)
notApplicableDeviceCount := int32(8)
requestBody.SetNotApplicableDeviceCount(¬ApplicableDeviceCount)
compliantDeviceCount := int32(4)
requestBody.SetCompliantDeviceCount(&compliantDeviceCount)
remediatedDeviceCount := int32(5)
requestBody.SetRemediatedDeviceCount(&remediatedDeviceCount)
nonCompliantDeviceCount := int32(7)
requestBody.SetNonCompliantDeviceCount(&nonCompliantDeviceCount)
errorDeviceCount := int32(0)
requestBody.SetErrorDeviceCount(&errorDeviceCount)
conflictDeviceCount := int32(3)
requestBody.SetConflictDeviceCount(&conflictDeviceCount)
deviceSettingStateSummaries, err := graphClient.DeviceManagement().DeviceConfigurations().ByDeviceConfigurationId("deviceConfiguration-id").DeviceSettingStateSummaries().BySettingStateDeviceSummaryId("settingStateDeviceSummary-id").Patch(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SettingStateDeviceSummary settingStateDeviceSummary = new SettingStateDeviceSummary();
settingStateDeviceSummary.setOdataType("#microsoft.graph.settingStateDeviceSummary");
settingStateDeviceSummary.setSettingName("Setting Name value");
settingStateDeviceSummary.setInstancePath("Instance Path value");
settingStateDeviceSummary.setUnknownDeviceCount(2);
settingStateDeviceSummary.setNotApplicableDeviceCount(8);
settingStateDeviceSummary.setCompliantDeviceCount(4);
settingStateDeviceSummary.setRemediatedDeviceCount(5);
settingStateDeviceSummary.setNonCompliantDeviceCount(7);
settingStateDeviceSummary.setErrorDeviceCount(0);
settingStateDeviceSummary.setConflictDeviceCount(3);
SettingStateDeviceSummary result = graphClient.deviceManagement().deviceConfigurations().byDeviceConfigurationId("{deviceConfiguration-id}").deviceSettingStateSummaries().bySettingStateDeviceSummaryId("{settingStateDeviceSummary-id}").patch(settingStateDeviceSummary);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
const settingStateDeviceSummary = {
'@odata.type': '#microsoft.graph.settingStateDeviceSummary',
settingName: 'Setting Name value',
instancePath: 'Instance Path value',
unknownDeviceCount: 2,
notApplicableDeviceCount: 8,
compliantDeviceCount: 4,
remediatedDeviceCount: 5,
nonCompliantDeviceCount: 7,
errorDeviceCount: 0,
conflictDeviceCount: 3
};
await client.api('/deviceManagement/deviceConfigurations/{deviceConfigurationId}/deviceSettingStateSummaries/{settingStateDeviceSummaryId}')
.update(settingStateDeviceSummary);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SettingStateDeviceSummary;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SettingStateDeviceSummary();
$requestBody->setOdataType('#microsoft.graph.settingStateDeviceSummary');
$requestBody->setSettingName('Setting Name value');
$requestBody->setInstancePath('Instance Path value');
$requestBody->setUnknownDeviceCount(2);
$requestBody->setNotApplicableDeviceCount(8);
$requestBody->setCompliantDeviceCount(4);
$requestBody->setRemediatedDeviceCount(5);
$requestBody->setNonCompliantDeviceCount(7);
$requestBody->setErrorDeviceCount(0);
$requestBody->setConflictDeviceCount(3);
$result = $graphServiceClient->deviceManagement()->deviceConfigurations()->byDeviceConfigurationId('deviceConfiguration-id')->deviceSettingStateSummaries()->bySettingStateDeviceSummaryId('settingStateDeviceSummary-id')->patch($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Import-Module Microsoft.Graph.DeviceManagement
$params = @{
"@odata.type" = "#microsoft.graph.settingStateDeviceSummary"
settingName = "Setting Name value"
instancePath = "Instance Path value"
unknownDeviceCount = 2
notApplicableDeviceCount = 8
compliantDeviceCount = 4
remediatedDeviceCount = 5
nonCompliantDeviceCount = 7
errorDeviceCount = 0
conflictDeviceCount = 3
}
Update-MgDeviceManagementDeviceConfigurationDeviceSettingStateSummary -DeviceConfigurationId $deviceConfigurationId -SettingStateDeviceSummaryId $settingStateDeviceSummaryId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
from msgraph import GraphServiceClient
from msgraph.generated.models.setting_state_device_summary import SettingStateDeviceSummary
graph_client = GraphServiceClient(credentials, scopes)
request_body = SettingStateDeviceSummary(
odata_type = "#microsoft.graph.settingStateDeviceSummary",
setting_name = "Setting Name value",
instance_path = "Instance Path value",
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_configurations.by_device_configuration_id('deviceConfiguration-id').device_setting_state_summaries.by_setting_state_device_summary_id('settingStateDeviceSummary-id').patch(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
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.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 409
{
"@odata.type": "#microsoft.graph.settingStateDeviceSummary",
"id": "3e2d4526-4526-3e2d-2645-2d3e26452d3e",
"settingName": "Setting Name value",
"instancePath": "Instance Path value",
"unknownDeviceCount": 2,
"notApplicableDeviceCount": 8,
"compliantDeviceCount": 4,
"remediatedDeviceCount": 5,
"nonCompliantDeviceCount": 7,
"errorDeviceCount": 0,
"conflictDeviceCount": 3
}