Skip to content

PATCH on devicehealthscript for intune causes Odataroute error #2922

@craftzneko

Description

@craftzneko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions