microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

PATCH on devicehealthscript for intune causes Odataroute error

Open
#2,922 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

I have always been able to update a device health script using this method

Update the Intune script

        echo "Updating Intune script..."
        curl --location --request PATCH "https://graph.microsoft.com/beta/deviceManagement/deviceHealthScripts/$ScriptID" \
        --header "Authorization: Bearer $accessToken" \
        --header 'Content-Type: application/json' \
        --data-raw "{
          \"@odata.type\": \"#microsoft.graph.deviceHealthScript\",
          \"detectionScriptContent\": \"$scriptContent\"
        }"

As recently as 9th may, they are run as part of dev ops pipelines. However recently they have started failing with this error

{"error":{"code":"No method match route template","message":"No OData route exists that match template ~/singleton/navigation with http verb PATCH for request /DeviceFE/StatelessDeviceFEService/deviceManagement/deviceHealthScripts.","innerError":{"date":"2025-06-04T19:34:35","request-id":"48aabff5-7513-46a0-aae9-602051d6d72a","client-request-id":"48aabff5-7513-46a0-aae9-602051d6d72a"}}}

Any advice/help would be appreciated

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

No repository file or test is named; begin by rerunning the supplied curl PATCH against the Microsoft Graph beta endpoint and compare the response with the last known working request. Done would require identifying a repository-owned change or a confirmed API-side behavior or workaround, but the issue provides neither a code location nor acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.