How to Gather OneDrive Sync Diagnostics for Microsoft Support
🔍 WiseChecker

How to Gather OneDrive Sync Diagnostics for Microsoft Support

When OneDrive sync fails with errors like stuck files, constant syncing, or unexpected deletions, Microsoft Support often requires diagnostic logs to identify the root cause. These logs contain detailed records of sync operations, file conflicts, and system events that generic error messages do not show. This article explains how to collect OneDrive sync diagnostics manually and through the built-in reporting tool. You will learn the exact steps to generate, locate, and export the diagnostic files that Microsoft Support requests.

Key Takeaways: Collecting OneDrive Sync Diagnostics for Support

  • OneDrive Settings > Sync and backup > Collect diagnostics: Generates a .zip file with sync logs, event traces, and registry data within 10-20 minutes.
  • %localappdata%\Microsoft\OneDrive\logs: Stores raw log files you can manually zip and attach to a support ticket.
  • OneDrive diagnostic tool (odls.exe): Captures network traces and detailed HTTP request logs for advanced troubleshooting.

ADVERTISEMENT

What OneDrive Sync Diagnostics Include

OneDrive sync diagnostics are a collection of log files and system data that record every action the sync engine performs. These logs help Microsoft engineers identify why files are not syncing, why sync is slow, or why files are being deleted unexpectedly. The diagnostic package typically includes:

Sync engine logs: These files, stored in the OneDrive logs folder, contain timestamps, file paths, error codes, and the status of each sync operation. They show whether a file was uploaded, downloaded, skipped, or conflicted.

Event tracing logs: Windows Event Tracing for OneDrive captures low-level system events such as network disconnections, authentication failures, and service crashes. These are not visible in the user interface.

Registry snapshots: The diagnostics export relevant registry keys under HKEY_CURRENT_USER\Software\Microsoft\OneDrive. These keys store account settings, throttle values, and sync root paths.

System information: Basic details about the Windows version, OneDrive build number, and installed updates are included to confirm the environment meets compatibility requirements.

Network traces: When collected with the advanced diagnostic tool, HTTP request and response headers for OneDrive API calls are captured. This data reveals issues like proxy blocks or certificate errors.

Method 1: Collect Diagnostics Through OneDrive Settings

This is the simplest method and works for most sync issues. It does not require administrator privileges or command-line tools. The process runs in the background and generates a compressed file that you can upload directly to a support ticket.

  1. Open OneDrive settings
    Right-click the OneDrive cloud icon in the system tray near the clock. Select Settings from the menu. If the icon is missing, open OneDrive from the Start menu.
  2. Navigate to the Sync and backup tab
    In the Settings window, click the Sync and backup tab at the top. This tab contains options for managing folders and troubleshooting.
  3. Click Advanced settings
    Under the Sync and backup tab, find the Advanced settings link and click it. A new section appears with diagnostic options.
  4. Select Collect diagnostics
    Scroll down to the Diagnostics section. Click the Collect diagnostics button. A confirmation dialog appears stating that logs will be gathered.
  5. Wait for the diagnostic collection to finish
    OneDrive begins gathering logs in the background. A progress indicator shows the status. The process typically takes 10 to 20 minutes depending on the volume of sync activity. Do not close OneDrive or restart your computer during this time.
  6. Open the diagnostic file location
    When collection completes, a notification appears. Click the notification to open the folder containing the diagnostic .zip file. The file is named OneDriveDiagnostics-YYYY-MM-DD-HHMMSS.zip.
  7. Attach the .zip file to your support ticket
    Upload the generated .zip file to the support case. Do not modify or extract the contents. Microsoft Support uses the original compressed format to process the logs.

ADVERTISEMENT

Method 2: Manually Export Log Files

If the built-in diagnostic tool fails or you need logs from a specific time window, you can manually export the raw log files. This method also works when OneDrive is not responding and you cannot access the Settings menu.

  1. Open File Explorer
    Press Windows + E to open File Explorer. Type the following path into the address bar and press Enter:
    %localappdata%\Microsoft\OneDrive\logs
  2. Identify the relevant log files
    The folder contains multiple .log files named with timestamps. Look for files with the date and time when the sync issue occurred. The most recent files are usually the most relevant.
  3. Copy the log files to a new folder
    Create a new folder on your desktop named OneDriveLogs. Select the relevant .log files, press Ctrl + C to copy them, and press Ctrl + V to paste them into the new folder.
  4. Compress the folder into a .zip archive
    Right-click the OneDriveLogs folder, select Send to, and then choose Compressed (zipped) folder. A .zip file with the same name is created on your desktop.
  5. Attach the .zip file to your support ticket
    Upload the .zip archive to the support case. Include a note describing the exact time and date of the sync issue so the support engineer can locate the relevant entries.

Method 3: Use the OneDrive Diagnostic Tool for Network Traces

For issues involving network connectivity, proxy authentication, or certificate errors, Microsoft Support may request a network trace. The OneDrive diagnostic tool odls.exe captures HTTP traffic between OneDrive and the Microsoft 365 servers.

  1. Open Command Prompt as administrator
    Type cmd in the Windows search bar, right-click Command Prompt, and select Run as administrator. Confirm the User Account Control prompt.
  2. Navigate to the OneDrive installation folder
    Type the following command and press Enter:
    cd %programfiles%\Microsoft OneDrive\
    If OneDrive is installed in the Program Files (x86) folder, use cd %programfiles(x86)%\Microsoft OneDrive\ instead.
  3. Run the diagnostic tool
    Type the following command and press Enter:
    odls.exe /collect
    The tool starts capturing network traces and sync logs. A command window shows the progress.
  4. Reproduce the sync issue
    While the tool is running, perform the action that triggers the sync problem. For example, try to sync a specific file or folder that is failing. The tool captures the network traffic during this interaction.
  5. Stop the diagnostic collection
    Press Ctrl + C in the Command Prompt window to stop the trace. The tool saves the output to the default logs folder under %localappdata%\Microsoft\OneDrive\logs.
  6. Locate and compress the output
    Open the logs folder as described in Method 2. Find the files created during the trace session. They are named with the timestamp when the trace started. Compress them into a .zip file and attach to your support ticket.

Common Issues When Collecting Diagnostics

The diagnostic collection button is grayed out

This occurs when OneDrive is not fully signed in or when the sync engine is in a critical error state. Sign out of OneDrive and sign back in. If the button remains disabled, restart the OneDrive process by right-clicking the cloud icon and selecting Close OneDrive, then relaunch it from the Start menu.

The diagnostic .zip file is empty or very small

An empty or small file usually means the diagnostic collection was interrupted. Close all other applications that may interfere with file access, such as antivirus software. Run the collection again without opening or saving files in OneDrive during the process.

OneDrive logs folder is missing

If the logs folder does not exist, OneDrive may not have started properly. Launch OneDrive manually from the Start menu and wait for it to sync at least one file. The logs folder is created automatically after the first sync operation. If it still does not appear, reinstall OneDrive by downloading the latest version from the Microsoft 365 admin center.

OneDrive Diagnostic Collection Methods: Comparison

Item Settings Collection Manual Export odls.exe Tool
Ease of use One click, no command line Requires File Explorer navigation Requires Command Prompt as admin
Data included Sync logs, event traces, registry Sync logs only Sync logs and network traces
Time to complete 10 to 20 minutes 2 to 5 minutes 5 to 15 minutes depending on trace
Best for General sync errors Quick logs for recent issues Network and authentication problems

You now have three methods to gather OneDrive sync diagnostics for Microsoft Support. Start with the built-in Settings collection for most cases. Use the manual export when the Settings tool is unavailable. Use the odls.exe tool only when directed by a support engineer for network-related issues. After submitting the diagnostics, check the support ticket for a response within 24 to 48 hours. To speed up the process, include a detailed description of the steps you followed to reproduce the problem.

ADVERTISEMENT