How to Fix Excel ADFS and MFA Authentication Failure for Dynamics 365
Question details
Users are unable to authenticate Excel to an on-premises Dynamics 365 data source using ADFS with MFA because the prompt closes unexpectedly.

- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Connecting Excel to an on-premises Dynamics 365 Customer Engagement web data source.
- Observed behavior
- The credential dialog closes prematurely without displaying the Multi-Factor Authentication (MFA) prompt, preventing a successful connection, even though the same connection works in Power BI Desktop.
Before modifying authentication caches or system credentials, ensure you have your correct Dynamics 365 login details and consult your organization's IT administrator, as MFA policies are centrally managed.
Clear Stale Office Authentication Data
Removing old or corrupted credentials forces Excel to request a fresh authentication token from the server.
Corrupted authentication caches can cause the login dialog to crash before the MFA prompt loads. Clearing the Windows Credential Manager and the ADAL cache resolves most identity conflicts.
Ensure Microsoft Excel and all other Office applications are completely closed.
Open the Windows Start menu, type 'Credential Manager', and press Enter to open the utility.
Navigate to 'Windows Credentials' and remove any saved entries related to Microsoft Office, ADAL, or Dynamics 365.
Press Win + R, type '%localappdata%\Microsoft\Identity\ADAL', and press Enter. Delete the contents of this folder (consult your IT department before doing this).
Restart your computer, open Excel, and attempt to connect to the Dynamics 365 data source again.

Repair Microsoft Edge WebView2 Runtime
Excel relies on WebView2 to render modern authentication dialogs like MFA prompts.
Try WPS Office for Seamless Spreadsheet Management
If you are experiencing persistent authentication and connection issues with Microsoft Excel, consider WPS Office as a lightweight, free, and highly compatible alternative for your daily spreadsheet and data analysis needs.
- 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite.
- 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and open your existing .xlsx files without losing any formatting.
- 3. Manage Your Data: Use the comprehensive Data tab to sort, filter, and analyze your local datasets efficiently.

Frequently Asked Questions
Why does the MFA prompt close automatically in Excel?
This usually happens when the Microsoft Edge WebView2 Runtime is corrupted or outdated, preventing Excel from properly rendering the modern authentication web dialog required for MFA.
Does clearing the ADAL cache affect other Office applications?
Yes, clearing the ADAL (Active Directory Authentication Library) cache will force all Microsoft Office applications on your device to request fresh authentication the next time you open them.
Why does the Dynamics 365 connection work in Power BI but not in Excel?
Power BI Desktop and Excel may use different internal authentication libraries or WebView components to handle ADFS and MFA. A corrupted cache in Excel's specific identity folder won't necessarily affect Power BI.




