Get My Message by Id [only works with User Credentials]
Name
get_my_message
Description
Get the mail message by message Id for the specified user ID or email address. [API reference]
Related Tables
Parameters
Parameter | Label | Required | Options | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|
MessageId | Message Id | YES | The Microsoft Mail message ID GUID for the message to read. (Example: 'c3220464-7209-453c-8840-3cf4de0afaa6') | |||||||
EmailBodyFormat | Email Body Format | YES |
|
|||||||
SelectedColumns | Selected Columns | NO | Select the individual columns to be included in the response, to reduce the response size and increase performance [API reference] |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
ReceivedDateTime |
DT_DBTIMESTAMP
|
datetime
|
False |
||
HasAttachments |
DT_BOOL
|
bit
|
False |
||
Subject |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
BodyPreview |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
|
SenderEmailAddressName |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
SenderEmailAddress |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
Importance |
DT_WSTR
|
nvarchar(500)
|
500 | False |
|
SentDateTime |
DT_DBTIMESTAMP
|
datetime
|
False |
||
CreatedDateTime |
DT_DBTIMESTAMP
|
datetime
|
False |
||
LastModifiedDateTime |
DT_DBTIMESTAMP
|
datetime
|
False |
||
ChangeKey |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
ToRecipients |
DT_WSTR
|
nvarchar(1190)
|
1190 | False |
|
CcRecipients |
DT_WSTR
|
nvarchar(1190)
|
1190 | False |
|
BccRecipients |
DT_WSTR
|
nvarchar(1190)
|
1190 | False |
|
ToRecipient1 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ToRecipient2 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ToRecipient3 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ToRecipient4 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ToRecipient5 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
CcRecipient1 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
CcRecipient2 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
CcRecipient3 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
CcRecipient4 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
CcRecipient5 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
BccRecipient1 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
BccRecipient2 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
BccRecipient3 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
BccRecipient4 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
BccRecipient5 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
Categories |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
ParentFolderId |
DT_WSTR
|
nvarchar(1200)
|
1200 | False |
|
ConversationId |
DT_WSTR
|
nvarchar(1200)
|
1200 | False |
|
ConversationIndex |
DT_WSTR
|
nvarchar(1200)
|
1200 | False |
|
IsDeliveryReceiptRequested |
DT_BOOL
|
bit
|
False |
||
IsReadReceiptRequested |
DT_BOOL
|
bit
|
False |
||
IsRead |
DT_BOOL
|
bit
|
False |
||
IsDraft |
DT_BOOL
|
bit
|
False |
||
WebLink |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
|
InferenceClassification |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
InternetMessageHeaders |
DT_NTEXT
|
nvarchar(MAX)
|
False |
||
BodyContentType |
DT_WSTR
|
nvarchar(500)
|
500 | False |
|
BodyContent |
DT_NTEXT
|
nvarchar(MAX)
|
False |
||
FromEmailAddressName |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
FromEmailAddress |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
ReplyTo |
DT_WSTR
|
nvarchar(1190)
|
1190 | False |
|
UniqueBodyContentType |
DT_WSTR
|
nvarchar(500)
|
500 | False |
|
UniqueBodyContent |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
|
FlagFlagStatus |
DT_WSTR
|
nvarchar(800)
|
800 | False |
|
ODataETag |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
InternetMessageId |
DT_WSTR
|
nvarchar(1800)
|
1800 | 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:
Lookup a row in MyMessages table using API Destination
This Endpoint belongs to MyMessages table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Get my message by id [only works with user credentials]
SELECT * FROM get_my_message
WHERE Id = 'abcd-1234-messageid'
WITH
(
"EmailBodyFormat" = 'html'
)
Get a specific message from the current user's account by the message ID
SELECT * FROM MyMessages
WHERE Id='AAXkADIwNzNhODMyLTZiMTQtNDhiMC02OWQzLTc5YTY5M2IyMjk0NABGAyAAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAAAAAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysBnxAAA='
get_my_message
endpoint belongs to
MyMessages
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get my message by id [only works with user credentials]
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_my_message
WHERE Id = ''abcd-1234-messageid''
WITH
(
"EmailBodyFormat" = ''html''
)';
EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];
Get a specific message from the current user's account by the message ID
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM MyMessages
WHERE Id=''AAXkADIwNzNhODMyLTZiMTQtNDhiMC02OWQzLTc5YTY5M2IyMjk0NABGAyAAAACbj2hVuNphT74wylrfU4ixBwAbUV6IxRnpQrqzrb2WfacdAAAAAAEMAAAbUV6IxRnpQrqzrb2WfacdAAAysBnxAAA=''';
EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];
get_my_message
endpoint belongs to
MyMessages
table(s), and can therefore be used via those table(s).