How to Fix Microsoft Graph createUploadSession 404 itemNotFound Error
Question details
The user is encountering a 404 itemNotFound error when using the Microsoft Graph createUploadSession API for specific folder paths in OneDrive for Business.

- Product
- Microsoft Graph API / OneDrive for Business
- Device & OS
- not provided
- Scenario
- Creating an upload session or uploading files to specific folder paths in OneDrive for Business using the Microsoft Graph API.
- Observed behavior
- The API returns a 404 itemNotFound error for certain folder paths, even though other paths in the same environment work correctly.
Ensure you have the exact API request payload, endpoint URL, and authentication token scopes recorded, as debugging a 404 error requires verifying the precise path and access rights.
Verify Folder Properties, Path Resolution, and Permissions
Check the path formatting, folder naming conventions, and API permissions to ensure the target item is accessible by Microsoft Graph.
A 404 itemNotFound error typically indicates that the API endpoint cannot locate the specified resource. This can happen if the path is malformed, contains unsupported characters, or if the authenticated application lacks the necessary permissions for that specific location.
Ensure the target folder path does not contain unsupported characters (such as <, >, :, ", |, ?, *, /, \) or leading/trailing spaces that might cause path resolution to fail.
Verify that the item path is correctly formatted using the colon syntax for Microsoft Graph (e.g., POST /me/drive/root:/TargetFolder/file.txt:/createUploadSession) and ensure the entire path is properly URL-encoded.
Confirm that your application or authenticated user has been granted 'Files.ReadWrite' or 'Files.ReadWrite.All' scopes for the specific Drive or Site where the folder resides.

Post the Request to Microsoft Q&A
If the path and permissions are verified but the error persists, escalate the issue to Microsoft Graph experts by providing your API details on Microsoft Q&A.
Try WPS Office for a Seamless Document Management Experience
If you are looking for a reliable, lightweight, and cost-effective office suite that doesn't rely on complex APIs for basic document handling, WPS Office is an excellent alternative to Microsoft Office. It offers robust, user-friendly tools for creating, editing, and managing your files securely.
- 1. Download the installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the software: Run the downloaded installer and follow the simple on-screen instructions to set up WPS Office on your computer.
- 3. Sign in and start working: Open WPS Office, sign in to access your free cloud storage space, and start managing your documents with ease.

Frequently Asked Questions
Why does createUploadSession return a 404 error for only some folders?
This usually occurs because the specific folder path might be misspelled, incorrectly URL-encoded, or lacks the necessary permissions for the app making the request. In OneDrive for Business, specific folders can have restricted access compared to the rest of the drive.
How do I correctly format the path for createUploadSession in Microsoft Graph?
When addressing an item by its path rather than its ID, you must use the colon syntax to separate the path from the endpoint. For example: POST /me/drive/root:/Folder/Subfolder/file.txt:/createUploadSession. Make sure the entire folder path is URL-encoded.
What API permissions are required to use createUploadSession?
Your application must be granted 'Files.ReadWrite' or 'Files.ReadWrite.All' permissions. Depending on your authentication flow, these can be either Delegated permissions (acting on behalf of a user) or Application permissions (running as a background service).




