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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Graph API HTTP Request...
Power Automate
Unanswered

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,073 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard