Reference

Endpoint Get Mail Folders


Name

get_mailfolders

Description

Get the list of mail folders for the specified user Id. [API reference]

Parameters

Parameter Required Options
Name: UserId

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: OrderBy

Label: Order By

Order the specified column by ascending or descending order
Option Value
None
AscendingOrder SomeColumn asc
DescendingOrder SomeColumn desc
Name: SearchCriteria

Label: Search Criteria

Data filter (e.g. somecolumn -eq 'somevalue')
Option Value
None
Equal Search SomeColumn eq 'SomeValue'
Substring Search substringof(SomeField,'abc')
Starts With startswith(SomeField, 'abc')
Name: PageSize

Label: Page Size

The number of records to include in each page of results
Name: SelectedColumns

Label: Selected Columns

Select the individual columns to be included in the response, to reduce the response size and increase performance

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(1200) 1200
DisplayName DT_WSTR nvarchar(500) 500
ParentFolderId DT_WSTR nvarchar(1200) 1200
ChildFolderCount DT_I4 int
UnreadItemCount DT_I4 int
TotalItemCount DT_I4 int
SizeInBytes DT_I4 int
IsHidden DT_BOOL bit
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 Mail Folders
Required Parameters
User ID or Email Fill-in the parameter...
SSIS API Source - Read from table or endpoint

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 Mail Folders
Required Parameters
User ID or Email Fill-in the parameter...
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Get mail folders

SELECT * FROM get_mailfolders
WITH
(
    "UserId" = 'abcd-1234-userid'
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Get mail folders

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_mailfolders
WITH
(
    "UserId" = ''abcd-1234-userid''
)';

EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];