Anything on this?
Regards
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello experts,
Using MS Graph SDK or MS graph explorer, we are trying to replace an attachment within a message. Updating a message attachment is not supported yet by ms graph API. that's why we do the operation in the following steps:
This works. However, randomly fails, resulting in two attachments the original and the new instead of the message having one updated attachment. the API returns success results in both cases with no indication of what might be the problem.
Here are the calls:
First Request to delete the attachment (step 3):
DELETE https://graph.microsoft.com/v1.0/me/messages/{messageId}/attachments/{attachmentId}
Second Request to add the modified attachment (step 4):
POST https://graph.microsoft.com/v1.0/me/messages/{messageId}/attachments
body:
{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "smime.p7m",
"contentType": "application/x-pkcs7-mime",
"contentBytes": "{contentBytes}"
}
Any feedback on what might be causing the issue would be appreciated.
Anything on this?
Regards
After some research on this, it looks like this is not an issue with ms graph. The thing is that we are using outlook for mobile on IOS to check the message after being manipulated and the outlook app does not update the attachment correctly which results in two attachments being displayed. If we query the message using ms graph explorer we can see that the attachment was replaced correctly. We concluded that this is a bug in Outlook app o IOS.
To confirm, we reinstalled the outlook app on IOS and the message with its attachments was displayed correctly.
Regards