Exchange Connection Problems

How to Create an Exchange Online Mailbox Folder Under Inbox via Graph API

Camila MilosovichCamila Milosovich Oct 29, 2026 869 views

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.

How to Create an Exchange Online Mailbox Folder Under Inbox Using Graph API
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 you start

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.

Solution 1Recommended

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.

1
Construct the correct API endpoint

Set your HTTP request URI to target the Inbox specifically: POST https://graph.microsoft.com/v1.0/me/mailFolders/inbox/childFolders.

2
Format the JSON request body

Create the payload specifying the name of the new folder. For example: { "displayName": "Your New Folder Name" }.

3
Send the authenticated request

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'.

4
Consult Microsoft Q&A for complex scenarios

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.

Execute a POST Request to the Graph API Child Folders Endpoint
Handling Shared Mailboxes: If you are creating a folder in a shared mailbox rather than the authenticated user's mailbox, replace '/me/' in the endpoint with '/users/{user-principal-name}/'.
Free Microsoft Office alternative

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.

Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight architecture ensures fast installation and rapid application launch.Familiar tabbed user interface, ensuring a seamless transition and zero learning curve.Integrated PDF tools to easily read, edit, and convert files you receive via email.
microsoft office alternative - wps office

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'.