Skip to content

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

@Jinxed2002

Description

@Jinxed2002

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions