list-mail-folders
Retrieve mail folders directly under the root folder in Microsoft 365, including search folders, with options to include hidden folders and filter results.
Instructions
Get the mail folder collection directly under the root folder of the signed-in user. The returned collection includes any mail search folders directly under the root. By default, this operation does not return hidden folders. Use a query parameter includeHiddenFolders to include them in the response. This operation does not return all mail folders in a mailbox, only the child folders of the root folder. To return all mail folders in a mailbox, each child folder must be traversed separately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeHiddenFolders | No | Include Hidden Folders | |
| top | No | Show only the first n items | |
| skip | No | Skip the first n items | |
| search | No | Search items by search phrases | |
| filter | No | Filter items by property values | |
| count | No | Include count of items | |
| orderby | No | Order items by property values | |
| select | No | Select properties to be returned | |
| expand | No | Expand related entities | |
| fetchAllPages | No | Automatically fetch all pages of results | |
| includeHeaders | No | Include response headers (including ETag) in the response metadata | |
| excludeResponse | No | Exclude the full response body and only return success or failure indication |