MessageAttachments
Provides a view of all attachments associated with email messages, including file names, types, and sizes, which is essential for identifying large or sensitive file transmissions.
Table Specific Information
Select
You can query MessageAttachments by specifying the Message Id (Required):
SELECT * FROM [MessageAttachments] WHERE MessageId = 'message id' SELECT * FROM [MessageAttachments] WHERE UserId = '92dfdfc6-f1d4-4965-9f71-30e4da4fa7fe' AND Id = 'AQMkAGRlMWQ5MDg0LWI5ZTQtNDk2Yi1hOTQ1LTU4YzFmMzEwZjlhMgBGAAAD-FjxR3cIwE6TEGSCVtIHcwcAQyR2Iw3coEOaUD1BLt0tnAAAAw4AAABDJHYjDdygQ5pQPUEu3S2cAAhJYnE3AAAAARIAEADUFdfqaYanT5_pTPvzgMYh' AND MessageId = 'AQMkAGRlMWQ5MDg0LWI5ZTQtNDk2Yi1hOTQ1LTU4YzFmMzEwZjlhMgBGAAAD-FjxR3cIwE6TEGSCVtIHcwcAQyR2Iw3coEOaUD1BLt0tnAAAAw4AAABDJHYjDdygQ5pQPUEu3S2cAAhJYnE3AAAA'
This query will get the Attachments of the specified Message as a list without including their content.
Columns
| Name | Type | Description |
| messageId | String | Unique identifier of the email message to which the attachment is linked. This helps associate the attachment with the parent message. |
| id [KEY] | String | Unique identifier for the attachment within the message. This value is used to retrieve or manage the attachment content. |
| contentType | String | The MIME content type of the attachment, indicating the nature and format of the file, such as application/pdf or image/jpeg. |
| isInline | Bool | Indicates whether the attachment is meant to be displayed inline within the body of the email message, such as embedded images or signatures. |
| lastModifiedDateTime | Datetime | The timestamp representing the last modification date and time of the attachment, useful for tracking version changes. |
| name | String | The original file name of the attachment, which is typically displayed to the user in the email client. |
| size | Int | The size of the attachment in bytes, used for storage tracking and to enforce attachment size limits. |
| userId | String | The identifier of the user who sent or received the message containing the attachment, used for audit and access control. |