get-mail-message-mime
get-mail-message-mimeRetrieve an email's original RFC 5322 MIME stream by message ID, preserving all headers and attachments for archiving to .eml.
Instructions
Download the raw MIME source (RFC 822 .eml content) of an Outlook email message by its message ID. Returns the complete original message including headers and encoded attachments.
đź’ˇ TIP: Download an email message as raw RFC 5322 MIME content (.eml format). Use this when archiving an email to disk preserving all original headers, body, and inline-encoded attachments. Returns the MIME stream as text. Find the message id with list-mail-messages first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Accept | No | Accept header for the response representation. Defaults to "text/plain". Only set this when Graph asks for a different format — e.g. a 403 SpeakerAttributionNotAllowed on transcript content names the media type to retry with. | |
| messageId | Yes | Value for the 'messageId' path segment. Pass it under the name 'messageId', not as 'id'. Use the 'id' field of the message object as returned by Microsoft Graph. | |
| fetchAllPages | No | Follow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search. | |
| includeHeaders | No | Include response headers (including ETag) in the response metadata | |
| excludeResponse | No | Exclude the full response body and only return success or failure indication | |
| includeHiddenMessages | No | Include Hidden Messages |