How to Check OneDrive Logs on Windows and Mac
🔍 WiseChecker

How to Check OneDrive Logs on Windows and Mac

When OneDrive fails to sync a file, crashes unexpectedly, or shows an error message, the first place to look for a root cause is the OneDrive log files. These logs record every sync operation, conflict, and error that the client encounters. On Windows, logs are stored in a hidden folder under your user profile. On Mac, logs reside in the Application Support directory. This article explains exactly where to find those logs on each operating system, how to open them, and how to interpret the most common error codes to resolve sync problems faster.

Key Takeaways: Finding and Reading OneDrive Log Files

  • Windows: %localappdata%\Microsoft\OneDrive\logs\ Contains the SyncDiagnostics.log and DeviceManager.log files that track all sync events and device registration errors.
  • Mac: ~/Library/Application Support/OneDrive/logs/ Stores the same log files in a hidden Library folder; use Finder’s Go menu to access it quickly.
  • Error code 0x8004de40: Indicates a sign-in token issue; clearing cached credentials in Credential Manager (Windows) or Keychain Access (Mac) often resolves it.

ADVERTISEMENT

What OneDrive Log Files Record and Why You Need Them

OneDrive logs are plain-text files that the sync client writes to automatically during every session. They contain timestamps, operation IDs, file paths, HTTP response codes, and error descriptions. Unlike the generic error messages shown in the system tray, these logs reveal the exact step where a sync failed, such as a file lock conflict, a permissions error, or a network timeout.

The two primary log files are:

SyncDiagnostics.log
This file records every file upload, download, rename, and deletion attempt. It also logs folder enumeration results from the server. If a file is stuck with a sync pending icon, the SyncDiagnostics.log will show the last HTTP request and response for that file.

DeviceManager.log
This file logs device registration, authentication token refresh, and tenant policy enforcement events. Errors in this file often point to expired credentials, blocked device access, or incorrect OneDrive group policy settings.

Both logs are rotated automatically when they reach about 5 MB. Older log files are compressed into .zip archives with a numeric suffix, such as SyncDiagnostics.1.log.zip. You can open .log files with any text editor, including Notepad on Windows and TextEdit on Mac. For .zip archives, extract them first with the built-in operating system tools.

Steps to Access OneDrive Logs on Windows

  1. Open the Run dialog
    Press Windows key + R on your keyboard. The Run dialog box appears.
  2. Paste the log folder path
    Type %localappdata%\Microsoft\OneDrive\logs\ into the Open field and click OK. File Explorer opens directly to the logs folder.
  3. Sort files by date modified
    Click the Date modified column header to sort the newest files to the top. The most recent log entries are in the file with the highest numeric suffix, for example SyncDiagnostics.5.log.
  4. Open the log file
    Double-click SyncDiagnostics.log or the most recent numbered variant. If Windows prompts you to choose a program, select Notepad.
  5. Search for error codes
    Press Ctrl + F and type the error code or the file name that is failing. Look for lines containing “Error”, “Failed”, or “Conflict”. Each line starts with a timestamp in the format YYYY-MM-DDTHH:MM:SS.

If you cannot see the logs folder, ensure that hidden items are visible. In File Explorer, click View > Show > Hidden items. The AppData folder is hidden by default on Windows.

ADVERTISEMENT

Steps to Access OneDrive Logs on Mac

  1. Open Finder
    Click the Finder icon in the Dock.
  2. Go to the Library folder
    In the Finder menu bar, click Go > Go to Folder. A text field appears.
  3. Paste the log folder path
    Type ~/Library/Application Support/OneDrive/logs/ and press Return. A Finder window opens showing the logs folder.
  4. Sort files by date added
    Click the Date Added or Date Modified column to bring the newest files to the top. On Mac, the active log file is usually named SyncDiagnostics.log.
  5. Open the log file
    Double-click SyncDiagnostics.log. It opens in Console by default. To view it as plain text, right-click the file, choose Open With, and select TextEdit.
  6. Search for error codes
    Press Command + F and type the error code or file name. Console highlights matching lines in yellow.

If the Library folder is hidden, hold the Option key while clicking the Go menu in Finder. The Library option appears directly in the Go menu without needing to type the path.

How to Read OneDrive Log Entries

Each log entry follows a consistent structure. A typical line looks like this:

2025-03-28T14:32:15.123Z [0x1A2B] [Info] Upload of file 'C:\Users\Name\OneDrive\report.xlsx' completed successfully (HTTP 200)

The parts are:

Timestamp
The date and time in Coordinated Universal Time (UTC). Convert to your local time zone by subtracting or adding hours.

Thread ID
The hexadecimal number in brackets, for example [0x1A2B]. This identifies which background thread processed the operation. You can ignore this unless you are tracing a specific operation across multiple lines.

Severity level
One of Info, Warning, Error, or Critical. Focus on Error and Critical lines first. Warning lines indicate recoverable issues such as a temporary network blip.

Message
The description of the event. Common messages include “Upload of file”, “Download of file”, “Conflict detected”, “Token refresh failed”, and “Server returned HTTP 409”.

HTTP status code
Numbers like 200 (success), 403 (forbidden), 404 (not found), 409 (conflict), 423 (locked), 429 (too many requests), and 500 (server error). A 409 code usually means the file was modified on the server while a local change was in progress.

Common OneDrive Log Errors and Their Meanings

0x8004de40 — Token refresh failed

This error appears in DeviceManager.log when OneDrive cannot renew its authentication token. The cause is often a cached credential that has expired or a password change that was not synced. To fix it, open Credential Manager on Windows or Keychain Access on Mac, locate all entries containing “OneDrive” or “MicrosoftAccount”, delete them, and sign in to OneDrive again.

HTTP 409 — File conflict detected

A 409 status code in SyncDiagnostics.log means the file was changed both locally and on the server at the same time. OneDrive creates a conflict copy with the computer name appended to the file name. Open both versions and merge the changes manually, then delete the conflict copy.

0x8007016a — The cloud file provider is not running

This error indicates that the Windows Cloud Files Filter driver is disabled or crashed. Restart the OneDrive process by right-clicking the OneDrive icon in the system tray and selecting Close OneDrive, then launch OneDrive again from the Start menu. If the error persists, run sfc /scannow in an elevated Command Prompt to repair system files.

HTTP 423 — File is locked by another process

A 423 status code means the file is open in another application, such as Microsoft Excel or a PDF reader. Close the application that holds the lock and wait for OneDrive to retry the sync. To force a retry immediately, right-click the file in File Explorer and select Sync.

SyncDiagnostics.log vs DeviceManager.log: What Each Log Covers

Item SyncDiagnostics.log DeviceManager.log
Recorded events File uploads, downloads, deletes, renames, and conflicts Device registration, token refresh, policy enforcement, and sign-in events
Typical error codes HTTP 200, 403, 404, 409, 423, 429, 500 0x8004de40, 0x8004de44, 0x8004de4c
When to check A specific file fails to sync or shows a pending icon OneDrive cannot start, shows sign-in prompt repeatedly, or reports a licensing error
File size limit 5 MB per file, then rotated and compressed 5 MB per file, then rotated and compressed

If you are troubleshooting a sign-in failure or a device block, open DeviceManager.log first. If you are troubleshooting a file that will not upload or download, open SyncDiagnostics.log first.

If OneDrive Logs Are Empty or Missing

An empty logs folder or a log file with only a header line usually means OneDrive was not running long enough to write entries, or the log rotation deleted old files. Start OneDrive, perform the action that triggers the error, then check the logs again immediately. If the folder does not exist at all, OneDrive may not be installed correctly. Reinstall OneDrive from the Microsoft 365 portal and restart your computer.

On Windows, if the logs folder is missing but OneDrive is running, the user profile may be corrupted. Create a new Windows user profile and sign in to OneDrive there. On Mac, ensure that OneDrive has disk access permissions in System Settings > Privacy & Security > Files and Folders.

Now you can locate, open, and read OneDrive log files on Windows and Mac without relying on generic error messages. The next time a sync fails, check SyncDiagnostics.log for HTTP 409 or 423 codes, and check DeviceManager.log for token errors like 0x8004de40. For faster troubleshooting, keep a text editor open with the log file loaded so you can refresh it after each sync attempt.

ADVERTISEMENT