Share via

Microsoft Graph API PATCH Error When Updating Antivirus Exclusions in MDE via PowerShell (Update-MgBetaDeviceManagementConfigurationPolicySetting)

Nikolaos Bazotis 0 Reputation points
2025-04-07T12:57:15.54+00:00

I’m currently working on managing antivirus policy exclusions in Microsoft Defender for Endpoint (MDE) using PowerShell and the Microsoft Graph API.

While I’m able to successfully retrieve the relevant policies and their current settings, I’m running into issues when trying to apply updates—specifically when modifying the exclusion list.

I’ve tried using both Update-MgBetaDeviceManagementConfigurationPolicySetting and a direct PATCH request to: https://graph.microsoft.com/beta/deviceManagement/configurationPolicies/$policyId/settings/$($setting.id)

However, I receive the following error:

No OData route exists that matches template ~/singleton/navigation/key/navigation/key with HTTP verb PATCH for request /DeviceConfigV2/DCV2GraphService/xxxx/deviceManagement/configurationPolicies('xxxx')/settings('x)

I've reviewed the available documentation, but I haven’t been able to find a working request body template or clear guidance on how to properly structure the PATCH request for this endpoint.

Any insights or working examples would be greatly appreciated.

Microsoft Security | Microsoft Graph

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.