> ## Documentation Index
> Fetch the complete documentation index at: https://docs.derekdinh.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting OneDrive Sync Errors and Reset Steps

> Resolve OneDrive stuck sync, error codes 0x8007016A and 0x80070194, path length limits, account relinking, and full reset procedures.

OneDrive sync problems range from a single file that refuses to upload to an entire sync client that becomes completely unresponsive. The OneDrive client communicates constantly with Microsoft's cloud storage service, and interruptions — whether from file locks, path length violations, corrupted local caches, or authentication token expiry — can cause the sync process to stall or report errors. This guide takes you through diagnosing and fixing the most common OneDrive sync issues from start to finish.

## Identifying the Problem

Before applying a fix, understand what OneDrive is telling you.

<Steps>
  <Step title="Check the OneDrive tray icon">
    Look for the OneDrive cloud icon in the system tray (Windows) or menu bar (macOS):

    * **White cloud, animated arrows**: Actively syncing
    * **White cloud, no animation**: Sync is up to date
    * **Blue cloud**: Personal OneDrive sync in progress
    * **Red circle with X**: Sync error — click to see details
    * **Yellow triangle with !**: Warning — something needs attention but sync is still running
    * **Grey cloud**: OneDrive is not running or signed out
  </Step>

  <Step title="View sync errors">
    Click the OneDrive icon, then click **View sync problems** or the error notification to open the activity panel. This lists every file or folder with a sync issue and the associated error code.
  </Step>

  <Step title="Check Windows Event Viewer (advanced)">
    For deeper diagnostic information, open **Event Viewer → Applications and Services Logs → Microsoft → OneDrive**. Error events here often contain internal error codes and file paths not shown in the OneDrive UI.
  </Step>
</Steps>

***

## Common Error Codes

<Accordion title="0x8007016A — The Cloud File Provider Is Not Running">
  This error means the OneDrive Files On-Demand provider process has stopped or become unresponsive. Files On-Demand is a Windows feature that shows OneDrive files as placeholders without downloading them locally.

  **Resolution steps:**

  1. Restart OneDrive: Right-click the system tray icon → **Close OneDrive**, then relaunch from the Start menu or by pressing `Win + R` and typing `%localappdata%\Microsoft\OneDrive\OneDrive.exe`.
  2. If the error persists, restart the **Windows Storage Service**:

  ```powershell theme={null}
  # Run in an elevated PowerShell window
  Stop-Service -Name "StorSvc"
  Start-Service -Name "StorSvc"
  ```

  3. If the problem continues after restarting, reset OneDrive (see the **Reset OneDrive** section below).
</Accordion>

<Accordion title="0x80070194 — The Cloud File Provider Exited Unexpectedly">
  Similar to 0x8007016A, this error indicates the OneDrive cloud file sync provider crashed during a sync operation, typically when a file was being opened or accessed.

  **Resolution steps:**

  1. Close all Office applications and any other programs that might have the affected file open.
  2. Restart OneDrive using the method above.
  3. If the error is tied to a specific file, move the file out of the OneDrive folder temporarily, let OneDrive sync, then move it back in.
  4. If the error recurs, reset OneDrive as described in the reset section below.
</Accordion>

<Accordion title="0x80070005 — Access Denied">
  OneDrive cannot access a file or folder due to insufficient permissions. This often happens with files created by another user account or files locked by a system process.

  **Resolution steps:**

  1. Right-click the affected file or folder → **Properties → Security**.
  2. Confirm the current user account has **Full Control** or at minimum **Modify** permission.
  3. Click **Advanced → Change** (under Owner) to take ownership if necessary.
  4. Check if the file is locked by a running process using **Sysinternals Process Explorer** or **Resource Monitor → CPU → Associated Handles**.
</Accordion>

<Accordion title="0x8007007B — Invalid File Name or Extension">
  The file name contains characters not supported by OneDrive or SharePoint (e.g., `#`, `%`, `&`, `*`, `:`, `<`, `>`, `?`, `/`, `\`, `|`).

  **Resolution steps:**

  1. Identify the file from the OneDrive error list.
  2. Rename the file to remove unsupported characters.
  3. OneDrive will automatically retry the upload after the file is renamed.

  Unsupported characters: `" * : < > ? / \ |` and names ending in a period or space.
</Accordion>

***

## Checking File Path Length Limits

Windows historically enforces a maximum file path length of **260 characters** (the `MAX_PATH` limit). OneDrive adds its own restriction: the total path — including the OneDrive root folder path, all subfolders, the file name, and the file extension — must not exceed **260 characters**.

<Steps>
  <Step title="Identify long paths">
    Use PowerShell to list all files in your OneDrive folder whose full path exceeds 260 characters:

    ```powershell theme={null}
    Get-ChildItem -Path "$env:USERPROFILE\OneDrive" -Recurse |
      Where-Object { $_.FullName.Length -gt 260 } |
      Select-Object FullName, @{N='Length';E={$_.FullName.Length}} |
      Sort-Object Length -Descending
    ```
  </Step>

  <Step title="Shorten affected paths">
    Move the affected files or folders closer to the root of the OneDrive folder, shorten subfolder names, or shorten file names. Aim to keep the total path under 255 characters to provide a safety margin.
  </Step>

  <Step title="Enable long paths in Windows (Windows 10 1607 and later)">
    For persistent environments with deep folder structures, you can enable long path support at the OS level via Group Policy:

    ```text theme={null}
    Computer Configuration → Administrative Templates →
    System → Filesystem → Enable Win32 long paths → Enabled
    ```

    Or via registry:

    ```powershell theme={null}
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
      -Name "LongPathsEnabled" -Value 1
    ```

    <Note>
      Enabling long paths requires applications to be built with long-path awareness. Not all third-party applications support this setting.
    </Note>
  </Step>
</Steps>

***

## Pausing and Resuming Sync

Pausing sync is useful when you need to prevent OneDrive from uploading changes during a large file operation, a system migration, or while on a metered network connection.

<Steps>
  <Step title="Pause sync">
    Click the OneDrive system tray icon → click the **Pause syncing** option and select the pause duration: **2 hours**, **8 hours**, or **24 hours**.
  </Step>

  <Step title="Resume sync manually">
    Click the OneDrive tray icon → click **Resume syncing** at any time before the pause duration expires.
  </Step>

  <Step title="Pause sync via Settings">
    For persistent pausing (e.g., while on a metered connection), open OneDrive **Settings → Sync and backup → Pause sync on metered networks** (Windows 11) or configure bandwidth settings under **Settings → Network**.
  </Step>
</Steps>

***

## Resetting OneDrive

A full OneDrive reset clears the sync cache and forces OneDrive to re-establish its connection to the cloud. This resolves most persistent sync issues that cannot be fixed by restarting alone.

<Warning>
  Resetting OneDrive disconnects your account from the sync client. Your files remain safely in the cloud — they are not deleted. After the reset, OneDrive will re-sync all files, which may take time depending on the number and size of files. Do not shut down the computer during re-sync.
</Warning>

<Steps>
  <Step title="Run the reset command">
    Press `Win + R` to open the Run dialogue and enter the following command, then click **OK**:

    ```text theme={null}
    %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
    ```

    The OneDrive tray icon will disappear briefly. If it does not reappear within 60 seconds, proceed to the next step.
  </Step>

  <Step title="Manually restart OneDrive after the reset">
    If the OneDrive icon does not reappear automatically, press `Win + R` again and run:

    ```text theme={null}
    %localappdata%\Microsoft\OneDrive\onedrive.exe
    ```
  </Step>

  <Step title="Sign in again">
    When prompted, sign in with the user's Microsoft 365 account. OneDrive will begin re-establishing sync for all folders.
  </Step>

  <Step title="Verify sync is progressing">
    Click the OneDrive icon and confirm the animated sync icon is visible. Allow sync to complete fully before testing file access.
  </Step>
</Steps>

<Tip>
  If the reset command path does not work, the OneDrive executable may be in a different location. Locate it using:

  ```powershell theme={null}
  Get-Item "$env:localappdata\Microsoft\OneDrive\OneDrive.exe" |
    Select-Object -ExpandProperty FullName
  ```
</Tip>

***

## Unlinking and Re-Linking Account

If a reset does not resolve the issue, or if the OneDrive account needs to be associated with a different Microsoft 365 account, unlink and re-link the account.

<Steps>
  <Step title="Unlink the account">
    Click the OneDrive system tray icon → **Help & Settings (gear icon) → Settings → Account → Unlink this PC**. Confirm by clicking **Unlink account** in the dialogue box.
  </Step>

  <Step title="Sign out of Microsoft 365 (optional but recommended)">
    If you are also reconfiguring the account, open any Office application, go to **File → Account → Sign out**, and remove the account from Credential Manager:

    ```cmd theme={null}
    rundll32.exe keymgr.dll, KRShowKeyMgr
    ```

    Remove any entries referencing `MicrosoftOffice`, `OneDrive`, or `live.com`.
  </Step>

  <Step title="Choose the OneDrive folder location">
    When OneDrive relaunches, you will be prompted to sign in and choose a sync folder location. You can keep the default (`C:\Users\<Username>\OneDrive`) or choose a different location. Keeping the original location allows OneDrive to match existing local files with cloud files, avoiding a full re-download.
  </Step>

  <Step title="Select folders to sync">
    If the user has a large OneDrive, use **Choose folders** during setup to selectively sync only the folders needed on this device, reducing bandwidth and disk usage.
  </Step>

  <Step title="Allow re-sync to complete">
    Monitor the OneDrive tray icon until the steady (non-animated) cloud icon confirms sync is complete.
  </Step>
</Steps>

***

## Escalation

<CardGroup cols={2}>
  <Card title="Microsoft Support" icon="headset">
    Raise a OneDrive support ticket at `https://admin.microsoft.com → Support → New service request`. Select **OneDrive for Business** as the product.
  </Card>

  <Card title="OneDrive Sync Logs" icon="file-lines">
    Before escalating, collect the OneDrive sync log files from `%localappdata%\Microsoft\OneDrive\logs\`. Attach `SyncDiagnostics.log` and recent `ODSyncService` logs to the support ticket.
  </Card>

  <Card title="Microsoft 365 Service Health" icon="signal">
    Verify there is no active OneDrive service incident at **admin.microsoft.com → Health → Service Health**.
  </Card>

  <Card title="Known Issues" icon="triangle-exclamation">
    Check the OneDrive release notes and known issues page for recently identified bugs that may match the reported error: `https://support.microsoft.com/en-us/office/onedrive-release-notes-845dcf18-f921-435e-bf28-4e24b95e5fc0`
  </Card>
</CardGroup>
