Messages
Contains metadata and content for email messages sent and received through Exchange. This includes sender, recipient, subject, and body fields for mailbox analytics and compliance checks.
Table Specific Information
Select
You can retrieve all from Messages, specify a Message (Id), ParentFolderId, or you can filter results by a certain column:
SELECT * FROM Messages WHERE Id = 'MyMessageId' SELECT * FROM Messages WHERE ParentFolderId = 'MyParentfolderId' SELECT * FROM Messages WHERE ParentFolderId = 'Drafts'
Note: Unless specifying the AlwaysRequstTableDependencies connection property, or selecting/filtering by the reference columns ParentFolderId, the value for ParentFolderId will remain null.
Insert
After the insert a new Message will be created in the User's Drafts folder.
INSERT INTO Messages (Subject, Body_Content) VALUES ('New test Email', 'Test Email created.')
Columns
| Name | Type | ReadOnly | Description |
| id [KEY] | String | False |
Unique identifier of the message, used to retrieve, update, or delete the message within the mailbox. |
| categories | String | False |
List of user-defined categories associated with the message, separated by commas. Categories help in organizing and filtering emails. |
| changeKey | String | False |
Version identifier for the message that is updated each time the item changes. Used for concurrency control. |
| createdDateTime | Datetime | False |
Timestamp indicating when the message was initially created in the mailbox. |
| lastModifiedDateTime | Datetime | False |
Timestamp of the most recent modification to the message content or metadata. |
| bccRecipients | String | False |
List of recipient email addresses included in the Bcc (blind carbon copy) field, separated by commas. These recipients receive the message without being visible to other recipients. |
| body_contentType | String | False |
Format of the email body content, which is typically either 'text' or 'html'. Determines how the body should be rendered. |
| body_content | String | False |
The actual content of the message body, formatted according to the specified content type (plain text or HTML). |
| bodyPreview | String | False |
A short, plain-text preview of the body content, usually displayed in email summaries or message lists. |
| ccRecipients | String | False |
List of email addresses in the Cc (carbon copy) field, separated by commas. These recipients receive a copy of the message alongside primary recipients. |
| conversationId | String | False |
Identifier for the conversation thread the message belongs to. Used to group related messages together. |
| flag_completedDateTime_dateTime | String | False |
Date and time the follow-up flag was marked complete for this message, indicating the completion of a user-defined task. |
| flag_completedDateTime_timeZone | String | False |
Time zone associated with the flag completion date and time, typically in Internet Assigned Numbers Authority (IANA) format. |
| flag_flagStatus | String | False |
Status of the follow-up flag on the message. Possible values include 'notFlagged', 'flagged', and 'complete'. |
| from_emailAddress_name | String | False |
Display name of the sender as it appears in the 'From' field of the message. |
| from_emailAddress_address | String | False |
The email address of the sender as extracted from the 'From' field in the message metadata. |
| hasAttachments | Bool | False |
Indicates whether the message includes one or more file or item attachments. A value of true means attachments are present. |
| importance | String | False |
Represents the importance level assigned to the message, such as Low, Normal, or High, which can influence how recipients treat the message. |
| inferenceClassification | String | False |
Specifies how the message was classified by Microsoft's inference engine, such as 'focused' or 'other', to support inbox prioritization. |
| internetMessageHeaders | String | False |
A collection of internet message headers, presented as a raw string, providing routing and metadata details for the email. |
| internetMessageId | String | False |
The unique message identifier assigned by the sending mail server, used to identify the message across systems. |
| isDeliveryReceiptRequested | Bool | False |
Indicates whether the sender requested a delivery receipt notification to confirm the message was successfully delivered to the recipient's server. |
| isDraft | Bool | False |
True if the message is in draft state and has not yet been sent. Drafts are typically stored in the 'Drafts' folder. |
| isRead | Bool | False |
Reflects whether the message has been marked as read by the recipient. A value of false indicates it is still unread. |
| isReadReceiptRequested | Bool | False |
Indicates whether the sender requested a read receipt to be sent when the recipient opens the message. |
| parentFolderId | String | False |
The unique identifier of the folder that contains this message, which can be used to locate its parent folder in the mailbox. |
| receivedDateTime | Datetime | False |
The timestamp indicating when the message was received by the mailbox, in Coordinated Universal Time (UTC). |
| replyTo | String | False |
Contains a list of reply-to email addresses specified in the message header, which can differ from the sender. |
| sender_emailAddress_name | String | False |
The display name associated with the sender's email address, typically shown in the 'From' line of the message. |
| sender_emailAddress_address | String | False |
The actual email address of the sender, used for sending and routing purposes. |
| sentDateTime | Datetime | False |
The timestamp indicating when the message was sent from the sender's outbox, in Coordinated Universal Time (UTC). |
| subject | String | False |
The subject line of the email message, summarizing its content or purpose as entered by the sender. |
| toRecipients | String | False |
A comma-separated list of primary recipients' email addresses as specified in the 'To' field of the message. |
| uniqueBody_contentType | String | False |
The content type of the unique body representation of the message, such as 'text' or 'html', used to define formatting. |
| uniqueBody_content | String | False |
The unique body content of the message, which includes only content not duplicated in previous messages in the thread. |
| webLink | String | False |
A URL that provides a direct link to the message in the Microsoft Outlook web interface. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| userId | String |
The identifier of the user associated with the message, typically used to filter or attribute messages by account owner. |