List childFolders
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Get the folder collection under the specified folder. You can use the .../me/mailFolders
shortcut to get the top-level
folder collection and navigate to another folder.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Mail.ReadBasic, Mail.Read, Mail.ReadWrite |
Delegated (personal Microsoft account) | Mail.ReadBasic, Mail.Read, Mail.ReadWrite |
Application | Mail.ReadBasic.All, Mail.Read, Mail.ReadWrite |
HTTP request
GET /me/mailFolders/{id}/childFolders
GET /users/{id | userPrincipalName}/mailFolders/{id}/childFolders
Optional query parameters
This method supports the OData Query Parameters to help customize the response.
Request headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {token}. Required. |
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and collection of mailFolder objects in the response body.
Examples
Example 1: List mail folders
Request
The following is an example of the request.
GET https://graph.microsoft.com/beta/me/mailFolders/AAMkAGVmMDEzM/childFolders
Response
The following is an example of the response.
Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "AAMkAGVmMDEzA",
"displayName": "Internal Screens",
"parentFolderId": "AAMkAGVmMDEzM",
"childFolderCount": 0,
"unreadItemCount": 2,
"totalItemCount": 2,
"wellKnownName": null
},
{
"id": "AAMkAGVmMDEzB",
"displayName": "Project Falcon",
"parentFolderId": "AAMkAGVmMDEzM",
"childFolderCount": 0,
"unreadItemCount": 5,
"totalItemCount": 5,
"wellKnownName": null
},
{
"id": "AAMkAGVmMDEzMA",
"displayName": "Finder",
"parentFolderId": "AAMkAGVmMDEzM",
"childFolderCount": 4,
"unreadItemCount": 0,
"totalItemCount": 0,
"wellKnownName": "searchfolders"
}
]
}
Example 2: List mail search folders
Request
The following is an example of the request.
GET https://graph.microsoft.com/beta/me/mailFolders/searchfolders/childFolders
Response
The following is an example of the response.
Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"@odata.type": "#microsoft.graph.mailSearchFolder",
"id": "AAMkAGE1NWMz",
"displayName": "Get MyAnalytics",
"parentFolderId": "AAMkAGE1NWMx",
"childFolderCount": 0,
"unreadItemCount": 6,
"totalItemCount": 6,
"wellKnownName": null,
"isSupported": true,
"filterQuery": "contains(subject, 'MyAnalytics')"
},
{
"@odata.type": "#microsoft.graph.mailSearchFolder",
"id": "AAMkAGE1NWMy",
"displayName": "Action Required",
"parentFolderId": "AAMkAGE1NWMx",
"childFolderCount": 0,
"unreadItemCount": 2,
"totalItemCount": 4,
"wellKnownName": null,
"isSupported": true,
"filterQuery": "contains(subject, 'ACTION REQUIRED')"
}
]
}