Microsoft Graph API: Update deviceManagementConfigurationSetting Error

John Rizal Javier 21 Reputation points
2022-06-28T08:45:36.483+00:00

Here's my full http request. I have tried modifying request body in a lot of different formats but still no luck. Please help if Im missing something here. Hoping for help and insights. Thank you!

//url
PATCH deviceManagement/configurationPolicies/0cd47064-b5da-4f2c-a584-822ccf820a32/settings/1

//request body
{
"id": "1",
"settingInstance": {
"@odata.type": "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance",
"settingDefinitionId": "user_vendor_msft_policy_config_microsoft_edgev84diffpolicymicrosoft_edge_recommended~defaultsearchprovider_recommended_defaultsearchprovidername_recommended_defaultsearchprovidername",
"settingInstanceTemplateReference": null,
"simpleSettingValue": {
"@odata.type": "#microsoft.graph.deviceManagementConfigurationStringSettingValue",
"settingValueTemplateReference": null,
"value": "google"
}
}
}

//response
{
"error": {
"code": "No method match route template",
"message": "No OData route exists that match template ~/singleton/navigation/key/navigation/key with http verb PATCH for request /DeviceConfigV2/DCV2GraphService/de147310-ffff-7537-0568-062415390465/deviceManagement/configurationPolicies('0cd47064-b5da-4f2c-a584-822ccf820a32')/settings('1').",
"innerError": {
"date": "2022-06-28T04:29:26",
"request-id": "2c5f24d7-a826-4fb9-85bc-8dbdc9fe2c60",
"client-request-id": "a939fb8d-29f2-7416-c4be-c8374670f34a"
}
}
}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,814 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 46,271 Reputation points Microsoft Vendor
    2022-06-29T02:58:23.677+00:00

    anonymous user, Based on my testing, when I modify a setting catalog policy, I find the request is send with the Put method:
    Request URL: https://graph.microsoft.com/beta/deviceManagement/configurationPolicies('3bb3d6d1-6692-4801-97c5-bfa5e626e478')
    Method: PUT

    Then I test to send a request under Graph Explorer and find it works.
    215905-image.png

    You can also try it to see if it works. However, if the device configuration policy is different. You can press "F12" to capture the log on Edge to find the request URL, method and Payload when we modify the policy in Intune portal, Here is one I captured in my environment. Then we can request in Microsoft Graph to see if it works.
    215971-image.png

    Hope it can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. John Rizal Javier 21 Reputation points
    2022-06-29T05:01:45.267+00:00

    @Crystal-MSFT

    Wow!!! That works perfectly!!! Thankyou so much! You're the best!