OneDrive Error Codes

Fix OneDrive for Business REST API itemNotFound Upload Errors

Nimra MalikNimra Malik Nov 25, 2026 868 views

Question details

Identify why a OneDrive for Business REST API upload returns itemNotFound even though the parent folder can be listed and files can be downloaded.

Fix OneDrive for Business REST API itemNotFound Upload Errors
Product
OneDrive for Business REST API
Device & OS
not provided
Scenario
A user sends a PUT request to upload a file to an existing OneDrive for Business folder.
Observed behavior
The upload request returns itemNotFound, while listing the parent folder and downloading files succeed.
Before you start

Collect the upload URL, HTTP method, response body, and the drive and parent folder identifiers used by the request. Remove access tokens and other sensitive information before sharing request details.

Solution 1Recommended

Verify the upload endpoint, folder ID, and permissions

Use this check when a folder is readable but an API upload to it returns itemNotFound.

Listing or downloading content does not by itself confirm that the upload URL is valid or that the token has write access.

1
Check the upload URL

Compare the PUT URL with the documentation for the API you are using. For Microsoft Graph, a simple upload to a known parent can use PUT /drives/{drive-id}/items/{parent-id}:/{filename}:/content.

2
Confirm the target folder

Use a GET request for /drives/{drive-id}/items/{parent-id} and confirm that the returned item is the intended folder. Use the same drive ID and parent ID in the upload request.

3
Review the request

Send the file bytes in the PUT request body and check the Authorization header and any required headers against the API documentation. URL-encode special characters in the filename or path segments without encoding the path separators.

4
Check write access

In the app's Microsoft Entra ID API permissions, check that the token has an appropriate Microsoft Graph write permission, such as Files.ReadWrite for a delegated request, and that the account can write to the target folder. Application permissions and administrator consent may be required for app-only requests.

Check the API version: The example endpoint uses Microsoft Graph. If your request uses a different OneDrive or SharePoint API, follow that API's supported upload syntax instead.
Free Microsoft Office alternative

Edit Office files with WPS Office

WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make moving existing files straightforward. It does not fix OneDrive REST API upload errors.

Open and edit Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXPrepare Office files for manual upload to OneDrive for BusinessWork in a familiar, easy-to-use interfaceUse a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why can I list a folder but not upload to it?

Read access does not guarantee write access, and the upload URL may point to the wrong drive or parent item. Check the token's write permissions and compare the PUT endpoint with the API documentation.

What Microsoft Graph endpoint uploads a file to a folder?

For a simple upload to a known parent folder, use PUT /drives/{drive-id}/items/{parent-id}:/{filename}:/content with the file bytes in the request body. Confirm that the drive and parent IDs refer to the intended folder.

Could a filename cause an itemNotFound error?

A malformed URL can cause the API to resolve the wrong path. Encode special characters in filename or path segments, while preserving the separators required by the endpoint syntax.

What does a successful browser upload tell me?

If the same account can upload to the same folder in the OneDrive browser interface, investigate the API request, endpoint syntax, and token permissions. A browser session and an API token can have different authorization contexts.