License & Subscription Issues

Fix Excel Switching to Primary Microsoft 365 Account

Aamir Naveed AkramAamir Naveed Akram Oct 28, 2026 868 views

Question details

Microsoft Excel unexpectedly switches from a secondary user's account to the primary Microsoft 365 Family account.

How to Fix Excel Switching to Primary Microsoft 365 Account
Product
Microsoft Excel
Device & OS
Windows
Scenario
Collaborating or sharing Excel files while using a Microsoft 365 Family subscription.
Observed behavior
Excel automatically reverts to the primary account identity, causing the wrong user identity to be displayed when authoring or sharing files.
Before you start

Ensure you have administrator privileges on your Windows PC, as you will need to run an elevated Command Prompt to manage Microsoft Office licenses.

Solution 1Recommended

Remove Obsolete Office Licenses via Command Prompt

Use the built-in Office script to find and delete outdated product keys that are causing account conflicts.

Often, older Microsoft Office installations leave behind cached licenses. This causes Excel to default to the primary Microsoft 365 account. Clearing these old keys forces Excel to use the correct current account.

1
Open Command Prompt as Administrator

Click the Windows Start button, type 'cmd', right-click on 'Command Prompt', and select 'Run as administrator'.

2
Navigate to the Office Installation Folder

Type 'cd C:\Program Files\Microsoft Office\Office16' (or 'Program Files (x86)' for 32-bit versions) and press Enter.

3
List Current Licenses

Type 'cscript ospp.vbs /dstatus' and press Enter. Review the output to locate the last 5 characters of the installed product key for the obsolete license.

4
Remove the Outdated License

Type 'cscript ospp.vbs /unpkey:XXXXX' (replace XXXXX with the 5 characters you found) and press Enter to delete the conflicting key.

Remove Obsolete Office Licenses via Command Prompt
Restart Excel: After successfully removing the old key, restart Microsoft Excel and sign in with the correct secondary account.
Free Microsoft Office alternative

Switch to WPS Office to Avoid Complex License Issues

If managing Microsoft 365 accounts, family subscriptions, and conflicting licenses is becoming a hassle, consider switching to WPS Office. It provides a lightweight, free alternative with no complicated account syncing issues.

  1. 1. Download the Installer: Visit the official WPS website to download the free WPS Office suite.
  2. 2. Install WPS Office: Run the downloaded setup file and follow the straightforward on-screen instructions.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing .xlsx files directly without any formatting loss.
Highly compatible with Microsoft Excel formats (.xlsx, .xls, .csv).No complex family subscription or auto-switching account issues.Lightweight installation that runs smoothly on all devices.Familiar user interface for seamless and immediate migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Microsoft 365 keep reverting to the primary account?

This typically happens when Windows has cached credentials or old product keys from a previous Office installation. Excel detects these leftover files and forces the application to authenticate with the primary user profile instead of your secondary account.

Will removing my Office license key via Command Prompt uninstall Excel?

No, running the ospp.vbs /unpkey command only removes the activation key from the system registry. Your software and files remain intact. You will simply be prompted to sign in again to activate the software with the correct account.

How do I ensure my correct identity appears when sharing Excel files?

Once you clear the obsolete credentials from Credential Manager and remove old licenses, restart Excel and sign in with your secondary account. Your correct name and email will then automatically appear as the author when collaborating or sharing.

Where can I find the Windows Credential Manager?

You can locate the Credential Manager by opening the Windows Start menu and typing 'Credential Manager'. It is also accessible through the Windows Control Panel under the 'User Accounts' section.