EndPoint Get Message Attachment
Name
get_message_attachment
Description
Get a specific attachment linked to the specified message Id. [API reference]
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
Name |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ContentType |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
IsInline |
DT_BOOL
|
bit
|
False |
||
LastModifiedDateTime |
DT_DBTIMESTAMP
|
datetime
|
False |
||
Size |
DT_I4
|
int
|
False |
||
ContentId |
DT_WSTR
|
nvarchar(2000)
|
2000 | False |
|
ContentBytes |
DT_NTEXT
|
nvarchar(MAX)
|
False |
||
ODataType |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ODataMediaContentType |
DT_WSTR
|
nvarchar(200)
|
200 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | 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 component to read data or in API Destination component to read/write data:
Get Message Attachment using API Source
Outlook Mail (Office 365)
Get Message Attachment

Get Message Attachment using API Destination
Outlook Mail (Office 365)
Get Message Attachment

ODBC application
Use these SQL queries in your ODBC application data source:
Get the specified attachment by message ID and attachment ID
SELECT * FROM get_message_attachment
WITH (MessageId='AAXkADIwNzNhODMyLTZiMTQtNDhiMC02OWQzLTc5YTY5M2IyMjk0NABGAyAAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAAAAAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysBnxAAA=',
AttachmentId='AAMkADIwNzNhODMyLTZiMTQtNDhiM704OWQzLTc5YTY5M2IyMjk0NABGAAqAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAABBAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysB9xAAABEgAQAK6dg4NuEa5Fmn_5Tp_D_XM=')
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get the specified attachment by message ID and attachment ID
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_message_attachment
WITH (MessageId=''AAXkADIwNzNhODMyLTZiMTQtNDhiMC02OWQzLTc5YTY5M2IyMjk0NABGAyAAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAAAAAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysBnxAAA='',
AttachmentId=''AAMkADIwNzNhODMyLTZiMTQtNDhiM704OWQzLTc5YTY5M2IyMjk0NABGAAqAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAABBAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysB9xAAABEgAQAK6dg4NuEa5Fmn_5Tp_D_XM='')';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_OUTLOOK_MAIL_OFFICE_365_IN_DATA_GATEWAY];