Fix OneDrive REST API Upload Session Service Unavailable Errors
Question details
The user needs to resolve a service unavailable error when uploading through a OneDrive REST API upload session.

- Product
- Microsoft OneDrive REST API
- Device & OS
- not provided
- Scenario
- An application uses an upload session to upload a file to OneDrive.
- Observed behavior
- Small-file uploads work, but uploads through the session URL return a service unavailable message even after several hours.
Capture the HTTP status, response headers, error body, and time of a failed request. Identify whether the failure occurs when creating the session or when sending a chunk to its upload URL.
Check OneDrive service health and the upload session request
Use this approach to rule out a service incident, an expired session, or an incorrectly formed chunk request.
For a work or school account, ask an administrator to check Health > Service health in the Microsoft 365 admin center for OneDrive incidents. For a personal account, check the OneDrive help center for service information.
Send an authenticated POST request to the appropriate createUploadSession endpoint and check the returned uploadUrl and expirationDateTime. If the session has expired, create a new one rather than reusing its URL.
Send each file chunk with PUT to the exact uploadUrl returned by the session. Do not add the authorization header to the upload URL request. Set Content-Length to the chunk size and Content-Range to the byte range and total file size.
Upload chunks sequentially, with each request smaller than 60 MiB; nonfinal chunk sizes must be multiples of 320 KiB. For a 503 response, honor any Retry-After header or retry with exponential backoff.

Send failed upload session details to OneDrive support
Use this option if only upload sessions fail after the service and request checks.
Work with Office files in WPS Office
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move existing files into your workflow. It does not fix the OneDrive API upload session error.

Frequently Asked Questions
Does a successful small-file upload mean upload sessions should work?
Not necessarily. A direct small-file upload and an upload session use different requests. Check the createUploadSession response and the subsequent PUT requests to the returned upload URL separately.
Should I send my access token to the upload URL?
Use an access token for the createUploadSession request, but omit the authorization header when sending PUT requests to the preauthenticated uploadUrl returned by the session.
What should I do if the upload session expires?
Check expirationDateTime in the session response. If the session has expired, send a new createUploadSession request and use its returned upload URL.
How should I retry a 503 response?
Check the response for a Retry-After header and wait for the indicated interval. If it is absent, retry with exponential backoff. If failures continue, collect request IDs and contact support.




