When OneDrive for Business launches on a Windows device that is managed by a Mac fleet management tool like Jamf, it sometimes uses the wrong Microsoft 365 account. The user sees a sign-in prompt for an account that is not their work email, or OneDrive syncs to a personal folder instead of the company tenant. This happens because the Mac fleet tool deploys OneDrive configuration files that include a default account setting, and that setting does not match the user’s assigned identity on the Windows device.
The root cause is a mismatch between the Windows user profile and the account GUID stored in the OneDrive registry key. Mac fleet tools often push a silent configuration XML that sets the DefaultToEnter or DefaultAccount value. If the Windows device has multiple user profiles or if the user signs in with a different UPN, OneDrive picks the wrong cached credential.
This article explains why the account mismatch occurs, provides a step-by-step fix to force OneDrive to use the correct account, and covers related failures such as sync errors and silent configuration failures.
Key Takeaways: Correcting OneDrive Account Selection on Windows Devices Deployed by Mac Fleet Tools
- OneDrive registry key HKCU\Software\Microsoft\OneDrive\Accounts\Business1\UserEmail: Stores the email address OneDrive uses on startup. If this value is wrong, OneDrive signs in with the wrong account.
- Mac fleet configuration XML file (e.g., com.microsoft.OneDrive.plist): Mac tools push settings that can override the Windows registry. Remove or edit this file to prevent account conflicts.
- OneDrive silent account configuration via GP or MDM policy: Use the
SilentAccountConfigpolicy to force OneDrive to use a specific tenant ID and user UPN without user interaction.
Why OneDrive on Windows Uses the Wrong Account After Mac Fleet Deployment
Mac fleet management tools such as Jamf Pro or Microsoft Intune for macOS push configuration profiles to managed devices. When a Windows device is enrolled in the same fleet, the tool may deploy a OneDrive configuration XML that includes a default account setting. This XML file is placed in the Windows user’s %LOCALAPPDATA%\Microsoft\OneDrive\settings\Business1 folder. The XML contains a DefaultToEnter key that specifies an email address. If that email address does not match the user’s primary Windows sign-in account, OneDrive uses the wrong account at startup.
Another cause is the Windows registry. OneDrive stores the last-used account in HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1\UserEmail. If the Mac fleet tool modifies this registry value or if the user previously signed in with a personal Microsoft account, OneDrive retains that old email. The tool does not clear the registry during deployment, so the stale account persists.
A third cause is the SilentAccountConfig policy. When enabled, OneDrive automatically signs in with the account that matches the device’s Azure AD join. If the Windows device is Azure AD joined but the Mac fleet tool configured a different tenant ID, OneDrive cannot find the correct account and falls back to the last cached one.
Steps to Force OneDrive to Use the Correct Account on Startup
Follow these steps to clear the wrong account data and force OneDrive to use the correct Microsoft 365 work account. Perform these steps on each affected Windows device.
Step 1: Stop OneDrive and Clear the Local Cache
- Right-click the OneDrive cloud icon in the system tray
Select Pause syncing > 2 hours. This stops sync activity. - Open Task Manager
Press Ctrl + Shift + Escape. Go to the Processes tab. Find Microsoft OneDrive. Right-click it and select End task. - Open the OneDrive settings folder
Press Win + R, type%LOCALAPPDATA%\Microsoft\OneDrive\settings\Business1, and press Enter. Delete all files in this folder. This removes the configuration XML that the Mac fleet tool placed. - Open the registry editor
Press Win + R, typeregedit, and press Enter. Navigate toHKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. Delete the entire Business1 key. Confirm the deletion. - Restart OneDrive
Press Win + R, type%LOCALAPPDATA%\Microsoft\OneDrive\OneDrive.exe, and press Enter. OneDrive opens and shows the sign-in window.
Step 2: Sign In with the Correct Work Account
- In the OneDrive sign-in window
Enter the user’s full work email address (e.g.,user@company.com). Click Sign in. - Complete the authentication
Enter the password or use Windows Hello. If the user has multi-factor authentication, complete the prompt. - Set up the sync folder
OneDrive prompts for the sync folder location. Accept the default%USERPROFILE%\OneDrive - CompanyNameand click Next. Click Open my OneDrive folder. - Verify the account
Right-click the OneDrive cloud icon and select Settings. Go to the Account tab. Confirm that the email shown under Your account matches the user’s work email.
Step 3: Prevent the Wrong Account from Returning
- Check the Mac fleet configuration profile
In the Mac fleet management console, locate the OneDrive configuration profile. Remove or comment out theDefaultToEnterkey. If the profile is required, set the value to the correct work email for all users. - Enable the SilentAccountConfig policy on Windows
Open the Group Policy editor or the Microsoft 365 admin center. Navigate to Computer Configuration > Administrative Templates > OneDrive. Enable the policy Silently sign in users to the OneDrive sync app with their Windows credentials. This forces OneDrive to use the Azure AD account tied to the Windows device. - Test the fix
Restart the Windows device. OneDrive should start and automatically sign in with the correct work account without showing a sign-in prompt.
If OneDrive Still Uses the Wrong Account After the Main Fix
OneDrive Shows a Sign-in Prompt for a Personal Account
This occurs when the Windows device has a cached personal Microsoft account. Open the registry editor and navigate to HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts. Delete all subkeys except Business1. Restart OneDrive.
OneDrive Syncs to a Personal Folder Instead of the Company Tenant
The Mac fleet tool may have set a TenantId value that points to a personal tenant. In the registry, navigate to HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1\TenantId. Verify the GUID matches your company’s Azure AD tenant ID. If it does not, update the value to the correct GUID. You can find the tenant ID in the Azure AD admin center under Properties.
OneDrive Fails to Start After Clearing the Registry
If OneDrive does not start after deleting the Business1 key, reinstall the OneDrive sync app. Download the latest version from the Microsoft 365 admin center. Run the installer and sign in with the correct work account.
| Item | Mac Fleet Configuration XML | Windows Registry Key |
|---|---|---|
| Description | XML file pushed by Jamf or Intune for macOS that sets default account settings | Stores the last-used account email and tenant ID for OneDrive |
| Location | %LOCALAPPDATA%\Microsoft\OneDrive\settings\Business1 |
HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1 |
| Common problem | Contains wrong DefaultToEnter email address that does not match the user |
Retains a stale account from a previous sign-in |
| Fix method | Delete all files in the Business1 settings folder | Delete the entire Business1 registry key |
After clearing both locations and signing in with the correct work account, OneDrive uses the right account on every startup. The SilentAccountConfig policy prevents the wrong account from reappearing. If the Mac fleet tool continues to push an incorrect XML file, update the configuration profile in the fleet management console to remove the DefaultToEnter key or set it to the correct email address for all users.
For additional control, use the OneDrive admin center to set tenant-wide sync restrictions. Under Settings > Sync, enable Only allow syncing on PCs joined to specific domains and enter your company’s Azure AD domain. This blocks OneDrive from signing in with accounts that are not part of your organization.