web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HTTP Patch action fail...
Power Automate
Answered

HTTP Patch action fail to update device management Graph api

(0) ShareShare
ReportReport
Posted on by 164

I'm trying to update (patch) the deviceNames for all my Intune managed devices using the output from a Compose action in a loop. I'm having a hard time locating any content where someone has used the HTTP action to patch Graph properties. This is what I have in the HTTP Patch action so far:

 

RADical_0-1679271035282.png

And this is the error I'm receiving:

{
 "_version": 3,
 "Message": "An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 3d757357-2f63-4ce4-9813-b21e3fb3eda7 - Url: https://fef.amsua0602.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices('2ff30ec9-038b-421c-9127-d6acc3be216b')?api-version=5022-12-12",
 "CustomApiErrorPhrase": "",
 "RetryAfter": null,
 "ErrorSourceService": "",
 "HttpHeaders": "{}"
}

 

RADical_1-1679271155860.png

 

I would greatly appreciate some feedback on this. Thanks!

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    Not sure if you've looked at the following documentation. Note that it's using 1.0 (not beta) which is likely better for production purposes. Definitely looks like you need a couple of headers, etc.

     

    https://github.com/microsoftgraph/microsoft-graph-docs/blob/main/api-reference/v1.0/api/intune-devices-manageddevice-update.md

     

    Caveat - I've never worked with any of the Intune managed device stuff, so can't really help with specifics.

  • RADical Profile Picture
    164 on at

    @grantjenkinsThanks for your response.

     

    I looked it over and tried with and without headers - same issue. I'm not sure if I still need the bearer token if I'm using an app registration with a secret value in the advanced settings for the connector. I've done a few get queries which work pretty well, but have never run a patch.

     

    I'm hoping someone has done this before and can probably share a few screenshots and/or application json/xml which would help to get me on the right track.

  • Verified answer
    RADical Profile Picture
    164 on at

    Figured it out after some failed attempts and research:

     

    RADical_0-1680564542076.png

     

    Body format should be like this:

    {
    	"action": "setDeviceName",
    	"actionName": "setDeviceName",
    	"deviceIds": ["INTUNEDEVICEID"],
    	"deviceName": "NEWDEVICENAME",
    	"platform": "windows",
    	"realAction": "setDeviceName",
    	"restartNow": false
    }

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 470

#2
Haque Profile Picture

Haque 411

#3
David_MA Profile Picture

David_MA 337 Super User 2026 Season 1

Last 30 days Overall leaderboard