Fix OneDrive API Folder and File Access Errors
Question details
The user needs to troubleshoot intermittent OneDrive API errors when accessing folder and file content.

- 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.
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.
Check Microsoft 365 service health for OneDrive incidents
Use this check to determine whether a Microsoft service incident may explain intermittent access errors.
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.
Select OneDrive for Business in the service list and review active incidents or advisories that overlap with the request failures.
Follow the incident updates in Service health and retry the affected request after Microsoft reports that the service has recovered.

Add timeout, retry, and monitoring logic to API requests
Use this approach to make the application more resilient to transient API or connectivity failures.
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.

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.




