OneDrive for Business Windows startup uses the wrong account for new profiles: Fix Guide
🔍 WiseChecker

OneDrive for Business Windows startup uses the wrong account for new profiles: Fix Guide

When a new Windows user profile signs in for the first time, OneDrive for Business may automatically start and attempt to sign in with a cached or inherited Microsoft account instead of the correct work or school account. This happens because OneDrive caches the last-used credentials in the registry and carries them over to new profiles created on the same machine. This guide explains why the wrong account appears and provides step-by-step methods to force OneDrive to prompt for the correct account on new profiles.

Key Takeaways: Stop OneDrive From Using the Wrong Account on New Windows Profiles

  • Registry key HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1: Stores the cached account GUID that OneDrive reuses on new profiles — clearing this forces a fresh sign-in prompt.
  • Group Policy setting \Computer Configuration\Administrative Templates\Windows Components\OneDrive\Prevent OneDrive from running: Disables OneDrive startup entirely until the correct user logs in and re-enables it.
  • OneDrive.exe /takeover command: Runs in a user session to reassociate OneDrive with the correct work or school account without reinstalling.

ADVERTISEMENT

Why OneDrive Starts With the Wrong Account on New Profiles

OneDrive for Business stores the last authenticated account in a registry key under the user hive. When Windows creates a new profile, it copies the default user profile settings, which may include OneDrive configuration from the original user. The OneDrive client on startup reads the cached account GUID and attempts to authenticate silently. If the cached account is a personal Microsoft account or a different work account, OneDrive will use that instead of prompting for the correct work or school account.

The problem is most common in shared workstation environments where IT provisions a golden image or default profile that already contains OneDrive sign-in data. It also occurs when a user signs into Windows with a local account, then later switches to a domain account — OneDrive retains the local account credentials.

Steps to Force OneDrive to Prompt for the Correct Account on New Profiles

Use Method 1 for individual machines. Use Method 2 for domain-joined computers with Group Policy. Use Method 3 when you need to switch accounts without clearing all user data.

Method 1: Clear the Cached Account Registry Key

  1. Open Registry Editor
    Press Windows key + R, type regedit, then press Enter. Click Yes if prompted by User Account Control.
  2. Navigate to the OneDrive account key
    Go to HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. If Business1 does not exist, look for Personal or Business2 — the cached account may be under any of these subkeys.
  3. Delete the cached account folder
    Right-click the subkey name for example Business1 and select Delete. Confirm the deletion when prompted.
  4. Restart OneDrive
    Open Task Manager with Ctrl + Shift + Esc. Locate Microsoft OneDrive in the Processes tab, right-click it, and select End task. Then launch OneDrive from the Start menu or by running C:\Program Files\Microsoft OneDrive\OneDrive.exe. OneDrive will now show the sign-in window for the correct account.

Method 2: Disable OneDrive Startup via Group Policy

  1. Open the Local Group Policy Editor
    Press Windows key + R, type gpedit.msc, then press Enter. This tool is available on Windows 10 Pro, Enterprise, and Education editions.
  2. Navigate to the OneDrive policy
    Go to Computer Configuration > Administrative Templates > Windows Components > OneDrive. If you do not see OneDrive listed, the ADMX files may not be installed — download them from Microsoft or use the registry method instead.
  3. Enable the policy to prevent OneDrive from running
    Double-click Prevent OneDrive from running. Select Enabled, then click OK. This stops OneDrive from starting automatically on all new profiles.
  4. Apply the policy and reboot
    Run gpupdate /force in Command Prompt as administrator, then restart the computer. New profiles will not launch OneDrive at startup.
  5. Allow OneDrive for the correct user
    After the correct user signs in, open the same policy and set it to Not Configured. Run gpupdate /force again and restart. OneDrive will now prompt for credentials instead of using the cached account.

Method 3: Use the /takeover Command to Switch Accounts

  1. Close OneDrive completely
    Right-click the OneDrive cloud icon in the system tray and select Settings. Under the Account tab, click Unlink this PC. Then end the OneDrive process in Task Manager.
  2. Run the takeover command
    Open Command Prompt as administrator. Type C:\Program Files\Microsoft OneDrive\OneDrive.exe /takeover and press Enter. This command forces OneDrive to reinitialize its account configuration.
  3. Sign in with the correct account
    OneDrive will open a sign-in window. Enter the correct work or school account credentials. The takeover command clears the cached account GUID and creates a new Business1 key with the correct account.

ADVERTISEMENT

If OneDrive Still Uses the Wrong Account After These Fixes

OneDrive continues to sign in with the same wrong account after clearing the registry

The registry key may be recreated by a startup script or a provisioning package. Check for scheduled tasks under Task Scheduler Library > Microsoft > Windows > OneDrive that run OneDrive Standalone Update Task. Disable this task temporarily. Also verify that no login script in Active Directory runs OneDrive.exe with a specific account switch.

New profiles still show the wrong account after Group Policy is applied

Group Policy may not apply to the default user profile. The policy only affects users after the policy is enforced. To reset the default profile, use the Copy Profile button in System Properties > Advanced > User Profiles. Select Default Profile, click Copy To, and overwrite the existing default profile with a clean version that has no OneDrive configuration.

OneDrive shows a blank sign-in window or error 0x8004de40 after the fix

This error indicates a corrupted OneDrive cache. Run OneDrive.exe /reset from Command Prompt. After the reset, OneDrive will reinstall itself silently. Then sign in with the correct account. If the error persists, uninstall OneDrive from Settings > Apps, restart the computer, and reinstall from the Microsoft 365 portal.

OneDrive Cached Account vs Group Policy vs Manual Reset: Key Differences

Item Registry Cache Clear Group Policy Disable /takeover Command
Scope Single user profile All users on the machine Single user session
Requires admin rights No Yes Yes
Permanent fix for new profiles No — reappears if default profile still has cached data Yes — prevents OneDrive from running until policy is removed No — only fixes the current user
Effect on existing files None — files remain synced after re-auth None — files remain on disk None — files remain synced

Now you can prevent OneDrive from automatically signing in with the wrong account on new Windows profiles. Start by clearing the Business1 registry key on the affected user. For shared machines, apply the Group Policy to disable OneDrive startup and re-enable it only after the correct user logs in. As an advanced tip, use the OneDrive.exe /takeover command in a login script to force account reassignment without user intervention.

ADVERTISEMENT