OneDrive Error Codes

How to Fix OneDrive Desktop Sign-In Error AADSTS50020

John WilsonJohn Wilson Oct 28, 2026 868 views

Question details

The user is unable to sign into the OneDrive desktop application due to error code AADSTS50020, even though OneDrive is accessible via a web browser and other Microsoft Office apps function properly.

Fix OneDrive Desktop Sign-In Error AADSTS50020
Product
Microsoft OneDrive
Device & OS
Windows
Scenario
Attempting to link or log into a Microsoft account on the OneDrive desktop client.
Observed behavior
The sign-in process fails exclusively on the OneDrive desktop app returning error AADSTS50020, while web access and other desktop Office applications experience no authentication issues.
Before you start

Ensure you have your Microsoft account credentials handy and verify your internet connection is stable before attempting to clear local authentication data.

Solution 1

Perform Standard Account and Credential Resets

Clear local caches and reset the OneDrive client to eliminate corrupted authentication tokens that cause sign-in failures.

In many cases, the desktop client fails to authenticate because outdated or conflicting security certificates and cached credentials remain on your system. Clearing these forces the app to request a fresh token.

1
Remove work or school accounts

Navigate to Windows Settings > Accounts > Access Work or School. Select the problematic account and click 'Disconnect'.

2
Clear Windows credentials

Open the Start menu, search for 'Credential Manager', and open it. Under 'Windows Credentials', locate any entries containing 'OneDrive' or 'MicrosoftOffice' and select 'Remove'.

3
Reset the OneDrive app

Press Windows Key + R to open the Run dialog. Type '%localappdata%\Microsoft\OneDrive\onedrive.exe /reset' and press Enter. Once the icon reappears in the system tray, try signing in again.

Free Microsoft Office alternative

Switch to WPS Office for Seamless Document Management

If persistent Microsoft account synchronization or sign-in errors are disrupting your workflow, consider using WPS Office. It provides a lightweight, integrated cloud environment that bypasses complicated directory authentication issues while keeping your documents accessible.

  1. 1. Download the installer: Visit the official WPS website and download the free installer for Windows.
  2. 2. Install the software: Run the setup file and follow the on-screen prompts to complete the installation in minutes.
  3. 3. Open your files directly: Launch WPS Office, sign in with a free account, and instantly open your existing Microsoft Office files from your local drive.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (docx, xlsx, pptx).Built-in WPS Cloud service for stable, straightforward document synchronization without complex directory errors.Lightweight application design that installs quickly and consumes minimal system resources.Free to use with a familiar, tabbed interface that requires zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

What exactly does OneDrive error AADSTS50020 mean?

This error code indicates an authentication failure with Azure Active Directory. It typically happens when a user account from an identity provider does not exist in the specific Microsoft directory or tenant they are trying to access through the desktop client.

Why can I access OneDrive on the web but not on the desktop app?

Web browsers use isolated session cookies for authentication, while the desktop application relies on the Windows Credential Manager and local application tokens. If the local tokens become corrupted or conflict with other logged-in Office apps, the desktop sign-in will fail even if the account itself is fine.

Will resetting or reinstalling OneDrive delete my locally saved files?

No. Resetting or reinstalling the OneDrive application only clears the sync settings and application cache. Your actual files will remain completely safe on your local hard drive and in the cloud storage.