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 / Graph API HTTP Request...
Power Automate
Answered

Graph API HTTP Request - Update message - Set subject of draft email (failed statuscode 400)

(0) ShareShare
ReportReport
Posted on by 8

Hi !

 

I am having trouble setting the subject of a draft email created by another http request in Flow.  The "update message" HTTP request is returning status code 400 and I cannot figure it out.  Does anyone have any pointers?

 

beginetienne_0-1707507487639.png

 

 

 

beginetienne_1-1707507582220.png

 

beginetienne_2-1707507609759.png

 

beginetienne_3-1707507662986.png

 

 

Results:

 

beginetienne_4-1707507753396.png

 

 

Categories:
I have the same question (0)
  • beginetienne Profile Picture
    8 on at

    I've reduced the flow to only the update message api call and hardcoding the messageID

     

    I've double checked the ID using the webLink URL provided by the createreplydraft call in the example above.

    beginetienne_0-1707509883072.png

     

    I still get error 400. Could this be a permission issue?  The message does have isdraft:true.  So I should be allowed to update it!

  • beginetienne Profile Picture
    8 on at

    One more finding, the get message API call works for that messageID. 

     

    Update Message (fails)

    {
    "Uri": "https://graph.microsoft.com/v1.0/me/messages/AAMkAGZjZjZkM2I2LTljMTctNDhjMy1iNjBlLTIwZDBhMDVmNjUxZABGAAAAAABiNIb03MPiR5A8XwnvWMsTBwBofBcqEsIPQp0LDJ6FVo5rAAAAAAEPAABofBcqEsIPQp0LDJ6FVo5rAACNNU44AAA=",
    "Method": "PATCH",
    "Body": "{\n \"subject\": \"TEST\",\n \"body\": {\n \"contentType\": \"\",\n \"content\": \"content-value\"\n },\n \"inferenceClassification\": \"other\"\n}",
    "ContentType": "application/json"
    }

     

    Get Message (works)

    {
    "Uri": "https://graph.microsoft.com/v1.0/me/messages/AAMkAGZjZjZkM2I2LTljMTctNDhjMy1iNjBlLTIwZDBhMDVmNjUxZABGAAAAAABiNIb03MPiR5A8XwnvWMsTBwBofBcqEsIPQp0LDJ6FVo5rAAAAAAEPAABofBcqEsIPQp0LDJ6FVo5rAACNNU44AAA=",
    "Method": "GET",
    "ContentType": "application/json"
    }

     

    Not sure if this is of any help!

  • Verified answer
    VictorIvanidze Profile Picture
    13,079 on at

    As you don't need to modify the message body, remove the "Body":{} part completely.

    Also, setting the "inferenceClassification" is useless for drafts.

    Run Graph Explorer and play a bit with PATCH request.

     

  • beginetienne Profile Picture
    8 on at

    I’ve changed the json to include only the subject, and the request was successful. Thanks !

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard