OneDrive Error Codes

How to Fix Microsoft Graph createUploadSession 404 itemNotFound Error

John WilsonJohn Wilson Oct 10, 2026 869 views

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.

How to Fix Microsoft Graph createUploadSession 404 itemNotFound Error
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.
Before you start

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.

Solution 1Recommended

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.

1
Check folder naming conventions

Ensure the target folder path does not contain unsupported characters (such as <, >, :, ", |, ?, *, /, \) or leading/trailing spaces that might cause path resolution to fail.

2
Validate path resolution syntax

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.

3
Verify API permissions

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.

Verify Folder Properties, Path Resolution, and Permissions
Permission Inheritance: Keep in mind that some folders in OneDrive for Business might have broken permission inheritance. Even if the root drive is accessible, specific subfolders may require explicit access rights.
Free Microsoft Office alternative

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. 1. Download the installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install the software: Run the downloaded installer and follow the simple on-screen instructions to set up WPS Office on your computer.
  3. 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.
Fully compatible with Microsoft Office formats including .docx, .xlsx, and .pptx.Lightweight installation with extremely fast startup speeds and lower system resource usage.Built-in cloud storage integration for easy file sharing and syncing without complex API configurations.Free to use with a familiar, highly intuitive user interface that makes switching effortless.
microsoft office alternative - wps office

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