Get Mail Folder by Id [only works with User Credentials]
Name
get_my_mailfolder
Description
Get the mail folder specified by the mail folder Id. [API reference]
Related Tables
Parameters
Parameter | Label | Required | Options | Description |
---|---|---|---|---|
MailFolderId | Mail Folder Id | YES | The Microsoft Mail mail folder ID for the mail folder. | |
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(1200)
|
1200 | False |
|
DisplayName |
DT_WSTR
|
nvarchar(500)
|
500 | False |
|
ParentFolderId |
DT_WSTR
|
nvarchar(1200)
|
1200 | False |
|
ChildFolderCount |
DT_I4
|
int
|
False |
||
UnreadItemCount |
DT_I4
|
int
|
False |
||
TotalItemCount |
DT_I4
|
int
|
False |
||
SizeInBytes |
DT_I4
|
int
|
False |
||
IsHidden |
DT_BOOL
|
bit
|
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 MyMailFolders table using API Destination
This Endpoint belongs to MyMailFolders 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 mail folder by id [only works with user credentials]
SELECT * FROM get_my_mailfolder
WHERE Id = 'abcd-1234-mailfolderid'
Get a specific mail folder associated with the current user by its mail folder ID
SELECT * FROM MyMailFolders
WHERE (Id='AAMkADIwNzNhODMyLTZiMTQtNDhiMCz4OWQzLTc5YTY5M2IyMjk0NAYuAAAAAACbj2hVuNphT74wyYrfU4ixAQAbUV6IxRnpQrWzrb2WfacdAAAAAAEKAcA=')
get_my_mailfolder
endpoint belongs to
MyMailFolders
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 mail folder by id [only works with user credentials]
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_my_mailfolder
WHERE Id = ''abcd-1234-mailfolderid''';
EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];
Get a specific mail folder associated with the current user by its mail folder ID
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM MyMailFolders
WHERE (Id=''AAMkADIwNzNhODMyLTZiMTQtNDhiMCz4OWQzLTc5YTY5M2IyMjk0NAYuAAAAAACbj2hVuNphT74wyYrfU4ixAQAbUV6IxRnpQrWzrb2WfacdAAAAAAEKAcA='')';
EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];
get_my_mailfolder
endpoint belongs to
MyMailFolders
table(s), and can therefore be used via those table(s).