Applies to
Windows 10 / Windows 11
Microsoft Outlook (Microsoft 365 Apps / Office 2016+)
Devices previously connected to a different Microsoft 365 tenant with the same username
Synopsis
After a Microsoft 365 tenant-to-tenant migration, the Outlook desktop application may fail to authenticate. Autodiscover attempts to resolve the mailbox against the previous tenant, resulting in repeated sign-in prompts or connection errors.
Cause
Several Windows and Office components can retain cached authentication and tenant-specific configuration from the source tenant. These components must be manually cleared to allow Outlook to successfully connect to the target tenant.
Resolution
Important
Close all Office applications (Outlook, Teams, Word, Excel, etc.) before proceeding.
Step 1 – Verify Windows Work or School Account Configuration
Right-click the Start button and select Settings
Go to Accounts
Select Access work or school
Check whether a work or school account is configured using the same username as the affected mailbox
Warning
It is generally safe to disconnect the account only if it appears exclusively under “Access work or school.”
Before disconnecting:
Go back to Accounts
Select Your info
If the same Microsoft 365 username appears here, the device is Entra ID–joined
In this scenario:
The account is required to sign in to Windows
Do not disconnect it
Contact your IT administrator to discuss migration strategy or converting the Windows profile to a local account
Microsoft documentation: Change from a Microsoft account to a local account
Step 2 – Clear Office Authentication Cache
2.1 Remove Identity Cache
Press Windows + R
Paste the following path and click OK:
%LOCALAPPDATA%\Microsoft\Delete the contents (not the folders themselves) of:
IdentityCache
OneAuth
2.2 Clear AAD Broker Token Cache
Press Windows + R
- Paste the following path and click OK:
%LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts
Delete all contents of the folder
2.3 Remove Cached Autodiscover Responses
Press Windows + R
- Paste the following path and click OK:
%USERPROFILE%\AppData\Local\Microsoft\Outlook
Delete only files ending with:
Autodiscover.xml
There may be multiple files present ending with “Autodiscover.xml” which can safely be deleted.
Step 3 – Force Outlook to Ignore the Last Known Good Autodiscover URL
Open Command Prompt
Click Start
Search for CMD
Run the following commands:
REG ADD HKCU\Software\Microsoft\Office\16.0\Outlook\AutoDiscover /v ExcludeLastKnownGoodUrl /t REG_DWORD /d 1
REG ADD HKCU\Software\Policies\Microsoft\Office\16.0\Outlook\AutoDiscover /v ExcludeLastKnownGoodUrl /t REG_DWORD /d 1
This ensures Outlook does not reuse a cached Autodiscover endpoint from the source tenant.
Step 4 – Create a New Outlook Profile
Recommendation
Do not delete the original Outlook profile, as it may contain data or additional mailboxes that were not migrated.
Open Control Panel
Select User Accounts
Click Mail
Select Show Profiles
Click Add
Name the new profile with a name of your choosing
Enter the email address/password and complete the setup wizard
Set the new profile as Default
Launch Outlook and confirm at the bottom:
Exchange status is Connected
Authentication completes successfully
