microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

"NO Odata route" error message when trying to delete Intune device compliance policy assignments

Open
#2,220 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Attention :wave: Question: API Service issue
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug

I am trying to delete Intune device compliance policy assignments (Entra groups) from compliance policies in Intune, both in graph explorer and using C# SDK, but I get this error:

"No OData route exists that match template ~/singleton/navigation/key/navigation/key with http verb DELETE for request /DeviceConfiguration_2311/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('{5ea2aa68-e1aa-4dd7-b9aa-779e3a3f9d87}')/assignments('{5ea2aa68-e1aa-4dd7-b9aa-779e3a3f9d87_6f32bcce-4c71-4ef4-b80c-1a08974a7eb3}').",

5ea2aa68-e1aa-4dd7-b9aa-779e3a3f9d87 is my compliance policy

5ea2aa68-e1aa-4dd7-b9aa-779e3a3f9d87_6f32bcce-4c71-4ef4-b80c-1a08974a7eb3 is the assignment ID, which includes the above mentioned policy, as well as my Entra group (6f32bcce-4c71-4ef4-b80c-1a08974a7eb3).

To Reproduce
Steps to reproduce the behavior:

  1. Use this format in graph explorer

https://graph.microsoft.com/beta/deviceManagement/deviceCompliancePolicies/{5ea2aa68-e1aa-4dd7-b9aa-779e3a3f9d87}/assignments/{5ea2aa68-e1aa-4dd7-b9aa-779e3a3f9d87_6f32bcce-4c71-4ef4-b80c-1a08974a7eb3}

Would need to replace the ID's.

In C#:

await graphClient.Result.DeviceManagement.DeviceCompliancePolicies[policyID].Assignments[assignment.Id].DeleteAsync();

Expected behavior

According to the documentation this should work, but I am not experiencing that.

Screenshots
If applicable, add screenshots to help explain your problem.

2023-11-16 14_21_56-Graph Explorer _ Try Microsoft Graph APIs - Microsoft Graph

2023-11-16 14_22_46-Clipboard

Client version
Provide the client version number from the NuGet package.

6.51.0

Desktop (please complete the following information):

  • OS: Windows 11 - 22631.2715
  • Browser: Chrome
  • Version 119.0.6045.160

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the DELETE request in Graph Explorer and with the C# SDK call shown in the issue, using the documented deviceCompliancePolicies/{policyID}/assignments/{assignmentID} endpoint. Compare the returned OData route error with the linked Microsoft Graph deletion documentation; done means establishing whether the documented operation works or identifying the API behavior that must be corrected. No repository file or test is mentioned.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.