OneDrive Error Codes

Fix OneDrive API Folder and File Access Errors

Ayan MasoodAyan Masood Nov 22, 2026 868 views

Question details

The user needs to troubleshoot intermittent OneDrive API errors when accessing folder and file content.

Fix OneDrive API Folder and File Access Errors
Product
Microsoft OneDrive API
Device & OS
not provided
Scenario
An application retrieves content from OneDrive folders after authentication succeeds.
Observed behavior
Some requests intermittently return UnknownError or HTTP 504 responses.
Before you start

Record the affected API endpoint, response status, error message, and time of the failure. If available, capture the response request ID without logging access tokens or file contents.

Solution 1Recommended

Check Microsoft 365 service health for OneDrive incidents

Use this check to determine whether a Microsoft service incident may explain intermittent access errors.

1
Open service health

Sign in to the Microsoft 365 admin center and select Health > Service health. If you do not have access, ask your Microsoft 365 administrator to check it.

2
Review OneDrive incidents

Select OneDrive for Business in the service list and review active incidents or advisories that overlap with the request failures.

3
Monitor and retry

Follow the incident updates in Service health and retry the affected request after Microsoft reports that the service has recovered.

Check Microsoft 365 service health for OneDrive incidents
No incident listed?: An HTTP 504 can also result from a network or gateway timeout. Continue with request logging and retry handling if no relevant service incident is shown.
Free Microsoft Office alternative

Work with Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Office files. Move compatible files into WPS to continue working locally; it does not fix OneDrive API or Microsoft service errors.

Open and edit files locally when they are available on your deviceCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar interface for an easy transition from Microsoft OfficeFree and lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does successful authentication mean OneDrive is working correctly?

No. Authentication can succeed while a later file request fails because of a service incident, a timeout, or another access issue. Check the request response and Microsoft 365 service health.

What does an HTTP 504 response mean for a OneDrive API request?

HTTP 504 indicates that a gateway did not receive a timely response from an upstream service. Check service health and network connectivity, then retry the request using a bounded backoff strategy.

Where can I check for a OneDrive outage?

In the Microsoft 365 admin center, select Health > Service health and review OneDrive for Business incidents and advisories. Ask your administrator if you cannot access the dashboard.

Should my application retry every failed request?

No. Retry transient failures according to the API's guidance, honor Retry-After when present, and set a retry limit. Check whether repeating an operation is safe before retrying requests that modify data.