Share via


Fix authentication issues in Office applications when you try to connect to a Microsoft 365 service

Symptoms

Authentication automatically fails in some Microsoft Office applications and Outlook may go into the "Need Password" state without any interaction. Additionally, when you make a Web Account Manager API call to FindAllAccountsAsync, you may see error code "-2147024809" in the Microsoft Entra logs or Office Client logs.

Important

This issue occurs only on computers that are running Windows 10, version 1703 or later, and Microsoft 365 version 1807 or later.

Cause

The authentication issue occurs because of missing package information about either the Active Directory Authentication Library (ADAL) or Live ID.

Resolution

Tip

To diagnose and automatically fix several common Office sign-in issues, you can download and run Microsoft Support and Recovery Assistant.

To fix this issue, use PowerShell to reinstall the packages for Microsoft Entra WAM plugin (for organizational or work accounts) and Live ID (for personal accounts such as @outlook.com, @hotmail.com, and so on). To do this, follow these steps:

  1. Right-click the Windows icon in your task bar, and then select Windows PowerShell (Admin).

  2. If you're prompted by a User Account Control (UAC) window, select Yes to start PowerShell.

  3. If your issue is about a work account, you have to fix the Microsoft Entra WAM plugin package. Run the following command in the command console:

    if (-not (Get-AppxPackage Microsoft.AAD.BrokerPlugin)) { Add-AppxPackage -Register "$env:windir\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\Appxmanifest.xml" -DisableDevelopmentMode -ForceApplicationShutdown } Get-AppxPackage Microsoft.AAD.BrokerPlugin
    
  4. If your issue is about a personal account, you have to fix the Live ID package. Run the following command in the command console:

    if (-not (Get-AppxPackage Microsoft.Windows.CloudExperienceHost)) { Add-AppxPackage -Register "$env:windir\SystemApps\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\Appxmanifest.xml" -DisableDevelopmentMode -ForceApplicationShutdown } Get-AppxPackage Microsoft.Windows.CloudExperienceHost
    

After you run the commands, and if they completed without errors, you may see a quick progress indicator or a status result that contains information about the package installation.