Views:

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

  1. Right-click the Start button and select Settings
     


  2. Go to Accounts

  3. Select Access work or school

  4. 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:

  1. Go back to Accounts

  2. Select Your info

  3. 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

  1. Press Windows + R

  2. Paste the following path and click OK



    %LOCALAPPDATA%\Microsoft\

  3. Delete the contents (not the folders themselves) of:

    • IdentityCache

    • OneAuth






2.2 Clear AAD Broker Token Cache

  1. Press Windows + R

  2. Paste the following path and click OK: 



    %LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts


     

  3. Delete all contents of the folder


2.3 Remove Cached Autodiscover Responses

  1. Press Windows + R

  2. Paste the following path and click OK: 



    %USERPROFILE%\AppData\Local\Microsoft\Outlook


     

  3. 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

  1. Open Command Prompt

    • Click Start

    • Search for CMD

  2. 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.

  1. Open Control Panel

  2. Select User Accounts

  3. Click Mail

  4. Select Show Profiles

  5. Click Add

  6. Name the new profile with a name of your choosing

  7. Enter the email address/password and complete the setup wizard

  8. Set the new profile as Default

  9. Launch Outlook and confirm at the bottom:
     

    • Exchange status is Connected

    • Authentication completes successfully