microsoftgraph / microsoftgraph/msgraph-sdk-typescript

internetMessageHeaders not returned for Sent Items messages in Outlook Add-in

Open
#953 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage ToTriage type:bug
Dominant language
TypeScript
Stars
44
Forks
7
Avg merge
12h 40m
Merged PRs (30d)
5

Description

Describe the bug

When using the Microsoft Graph SDK for TypeScript in an Outlook Add-in, the API call with
select("internetMessageHeaders") does not return internet headers for messages located in the user’s Sent Items folder.

This issue occurs when attempting to fetch the internet headers of a previous message in the same conversation where the reply is being made to a message from Sent Items.

The same Graph SDK call works correctly for messages located in the Inbox folder and returns the expected internetMessageHeaders.

Observed behavior in Outlook Add-in:

  • Inbox messages → internetMessageHeaders returned correctly

  • Sent Items messages → internetMessageHeaders is missing or empty

This behavior is consistent when using the Graph SDK for TypeScript within the Outlook Add-in runtime.

Expected behavior

Using the Microsoft Graph SDK for TypeScript, the internetMessageHeaders property should be returned for a message regardless of whether it resides in Inbox or Sent Items

The message folder location should not affect the availability of internetMessageHeaders, especially when accessing messages within the same conversation in an Outlook Add-in.

How to reproduce
  • Create or open an Outlook Add-in that uses the Microsoft Graph SDK for TypeScript.

  • Identify an email conversation where:

    • An original message exists in the Inbox
    • A reply to that message exists in Sent Items
  • From the Outlook Add-in, attempt to fetch internet headers for both messages using the Graph SDK:

const message = await graphClient
  .api(`/users/{userId}/messages/{messageId}`)
  .select("internetMessageHeaders")
  .get();
  • Observe the response:
    • For Inbox messages, internetMessageHeaders is returned as expected.
    • For Sent Items messages, internetMessageHeaders is missing or returned as an empty array.
SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported graphClient .api(...).select("internetMessageHeaders").get() call for equivalent Inbox and Sent Items messages in an Outlook Add-in. Record the SDK version and response differences; the issue is done when the cause is identified and headers are returned consistently, or the behavior is confirmed to be outside the SDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.