How to Create an Exchange Online Mailbox Folder Under Inbox via Graph API
Question details
The user needs to use the Microsoft Graph API to programmatically create a new child mail folder located specifically under the Inbox in an Exchange Online mailbox.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- Developing a custom application or script to organize and manage Exchange Online mailboxes via Microsoft Graph API calls.
- Observed behavior
- Creating a child folder requires specifying the correct API endpoint and formatting the JSON request body properly, which often requires specialist development guidance.
Before making API calls, ensure your Azure AD application has been granted the necessary Microsoft Graph API permissions, specifically the 'Mail.ReadWrite' scope, and that you have a valid Bearer access token.
Execute a POST Request to the Graph API Child Folders Endpoint
Use the dedicated Microsoft Graph endpoint for Inbox child folders to pass your new folder payload and successfully create the directory.
While Microsoft Graph can create folders in various locations, targeting the Inbox as a parent requires routing your request specifically to the 'childFolders' property of the Inbox endpoint.
If you encounter complex routing issues or require specialized troubleshooting for your specific tenant setup, the Microsoft Q&A forum is the recommended channel to seek developer assistance.
Set your HTTP request URI to target the Inbox specifically: POST https://graph.microsoft.com/v1.0/me/mailFolders/inbox/childFolders.
Create the payload specifying the name of the new folder. For example: { "displayName": "Your New Folder Name" }.
Using a tool like Postman or your application's HTTP client, send the POST request. Ensure your headers include 'Authorization: Bearer [your_token]' and 'Content-Type: application/json'.
If you receive errors regarding the endpoint or request body, post your query in the Microsoft Graph support section on Microsoft Q&A to confirm your implementation with specialists.

Looking for a Lightweight Alternative to Microsoft Office?
If you are managing business documents alongside your email infrastructure, WPS Office provides a powerful, free, and lightweight alternative to Microsoft Office. It delivers high performance without the heavy subscription fees.

Frequently Asked Questions
What permissions are required to create a mail folder using Graph API?
Your application must be granted the 'Mail.ReadWrite' permission scope (either Delegated or Application permissions, depending on your auth flow) to create or modify mail folders.
Can I create a child folder under a folder other than the Inbox?
Yes. To create a folder under a different parent folder, replace 'inbox' in the API endpoint with the specific folder's ID: POST https://graph.microsoft.com/v1.0/me/mailFolders/{folder-id}/childFolders.
Why am I getting a 403 Forbidden error when trying to create a folder?
A 403 error usually means your access token does not contain the required permissions. Verify your Azure AD application has the 'Mail.ReadWrite' consent and that you have generated a new token since the permission was granted.
How do I verify that the child folder was created successfully?
Upon a successful request, the Graph API will return a '201 Created' HTTP status code. The response body will contain the JSON representation of the newly created folder, including its assigned 'id'.




