msgraph-sdk-dotnet
msgraph-sdk-dotnet copied to clipboard
Some Internet Message Headers are not returning when retrieving Item Attachment content
Describe the bug I have a requirement to get all internet message headers belongs to an item attachment attached to an Outlook message. I have used following Graph API call to read item attachment content. https://docs.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&tabs=http#example-3-expand-and-get-the-properties-of-the-item-attached-to-a-message I was able to get some internet message headers, but not all the headers of the item attachment.
I found this link https://stackoverflow.com/questions/60947499/get-message-using-graph-missing-some-internetmessageheaders explains about how to get missing internet message headers. but I got "Bad Request" error in my case.
To Reproduce Steps to reproduce the behavior:
- Go to 'MS Graph Explorer'
- Try to retrieve item attachment content using /messages/message-id/attachments/attachment-id/?$expand=microsoft.graph.itemattachment/item
- Double check with using MHA or File=>properties=>internet message headers in Outlook Desktop
- You can see some missing headers
Expected behavior Should be able to see all headers
Screenshots
If applicable, add screenshots to help explain your problem.
var itemAttachment = await graphServiceClient.Users["11805967-f79a-4e1e-aac9-08bca571dd9f"] .Messages[messageId] .Attachments[messageWithItemAttachment[0].Id] .Request() .Expand($"microsoft.graph.itemAttachment/item") .GetAsync();
var item = itemAttachment.GetType().GetProperty("Item")?.GetValue(itemAttachment, null) as Microsoft.Graph.Message;
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
I've inquired about this issue. Let me see if I can get more information.
We are hitting the same issue. Any updates ?
Hey @hemakaranth and @piyumi25,
Any chance this is still an issue? From our end comparing the internet headers from outlook and the graph response yield the same results now when checking a message or whether it's an attachment.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Hi, is this still an issue ? Can anyone confirm if this happens all the time or if it is an intermittent issue and if this is only related to attachments and dotnet?
I'm using the X-MS-Exchange-Generated-Message-Source: Antispam Quarantine Agent
header in Redmine to identify mails that have an Auto-Submitted: auto-generated
header, but should still be processed as they were released from quarantine by a user...
This seems to work most of the time, but sometimes the header is just missing (accessing msgraph from redmine/ruby). Checking the mail in Outlook i can verify they exist.