question

NoamShabat-4146 avatar image
0 Votes"
NoamShabat-4146 asked NoamShabat-4146 commented

Updating email content in inbox using graph api

Hi.

I've been playing around with graph explorer trying to update emails that already exist in my inbox.
I need to update the message body.

Looking at the API reference, it says that i can only update the subject for draft emails, however i've been able to successfully update the emails in my inbox and change the body content.

So functionality and documentation are mis-matched (or perhaps I didn't understand something)
My question is - can I rely on this behavior? is this a documentation bug? or is this a bug in the graph API?

Thanks

microsoft-graph-sdkmicrosoft-graph-mail
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NoamShabat-4146

Thanks for visiting our forum, and according to your description above, your question is more related to Graph API. So I would remove the irrelevant tag, and hope your issue can be resolved soon. Thanks for your understanding!

0 Votes 0 ·

1 Answer

MaggieRain-1837 avatar image
0 Votes"
MaggieRain-1837 answered NoamShabat-4146 commented

When I call the endpoint https://graph.microsoft.com/v1.0/me/sendMail using a Patch or Put method I receive a Method Not Allowed - 405 error.

Based on this https://docs.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0 documentation I get the expected behavior.

From my end I haven't been able to replicate the same behavior, of being able to update the email body of an an mail in my inbox.

Please share the request ID and the time stamp of when you made the API call, this would enable the team to investigate this case further.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I've tried to provide a full answer here but keep getting http code 403.
Maybe the content i'm printing is invalid. I'll try a shorter version.
I've used method PATCH with url https://graph.microsoft.com/v1.0/me/messages/AAMkADM0ODJiZDY4LWVmYTYtNGExZS05MzNiLWJkZDczZTBlMGYxNQBGAAAAAADY1VK2GY3RS79jfvIqKwJ5BwB3llYzaow6Q76bwUwn5Er7AAAAAAEMAAB3llYzaow6Q76bwUwn5Er7AAABoNpCAAA=

Ran this using the graph explorer utility, and it works every time.
The request body i'm providing contains only the 'body' attribute, and within it the "contentType" and "content" fields.

This works every time.

0 Votes 0 ·