Endpoint Get Message Attachments
Name
get_message_attachments
Description
Get the list of attachments linked to the specified message Id. [API reference]
Parameters
Parameter | Required | Options | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Name:
Label: User ID or Email The Microsoft Mail user ID GUID or email address for the account to read messages from. (Examples: '4ff54a77-9c09-4274-958f-83bdc0a53900' or 'first.last@domain.com') |
YES | |||||||||||
Name:
Label: Message ID The message Id for which to get attachments from. |
YES | |||||||||||
Name:
Label: Order By Order the specified column by ascending or descending order |
|
|||||||||||
Name:
Label: Search Criteria Data filter (e.g. somecolumn -eq 'somevalue') |
|
|||||||||||
Name:
Label: Page Size The number of records to include in each page of results |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Name |
DT_WSTR
|
nvarchar(200)
|
200 | |
ContentType |
DT_WSTR
|
nvarchar(200)
|
200 | |
IsInline |
DT_BOOL
|
bit
|
||
LastModifiedDateTime |
DT_DBTIMESTAMP
|
datetime
|
||
Size |
DT_I4
|
int
|
||
ContentId |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
ContentBytes |
DT_NTEXT
|
nvarchar(MAX)
|
||
ODataType |
DT_WSTR
|
nvarchar(200)
|
200 | |
ODataMediaContentType |
DT_WSTR
|
nvarchar(200)
|
200 |
If the column you are looking for is missing, consider customizing Outlook Mail (Office 365) Connector.
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Outlook Mail (Office 365) Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
API Source - Outlook Mail (Office 365)
Outlook Mail Connector (Office 365) can be used to integrate Office 365 Outlook Mail API in your App / BI Tools. You can download attachment, read / search Emails, Users, MailFolders, Send email and more.
Outlook Mail (Office 365)
Get Message Attachments
Required Parameters | |
---|---|
User ID or Email | Fill-in the parameter... |
Message ID | Fill-in the parameter... |

API Destination
API Destination - Outlook Mail (Office 365)
Outlook Mail Connector (Office 365) can be used to integrate Office 365 Outlook Mail API in your App / BI Tools. You can download attachment, read / search Emails, Users, MailFolders, Send email and more.
Outlook Mail (Office 365)
Get Message Attachments
Required Parameters | |
---|---|
User ID or Email | Fill-in the parameter... |
Message ID | Fill-in the parameter... |

ODBC application
Use these SQL queries in your ODBC application data source:
Get all attachments linked to the specified message ID
SELECT * FROM get_message_attachments
WITH (MessageId='AAXkADIwNzNhODMyLTZiMTQtNDhiMC02OWQzLTc5YTY5M2IyMjk0NABGAyAAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAAAAAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysBnxAAA=')
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get all attachments linked to the specified message ID
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_message_attachments
WITH (MessageId=''AAXkADIwNzNhODMyLTZiMTQtNDhiMC02OWQzLTc5YTY5M2IyMjk0NABGAyAAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAAAAAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysBnxAAA='')';
EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];