Forum Discussion
Excel Power Query / Analysis Services authentication fails after reopening workbook
Hi BIscoverer
This behavior is a known and fairly common issue when using Microsoft Excel with Power Query against Azure Analysis Services via Microsoft Entra SSO, and it’s not working the way you logically expect. What’s happening is that Excel caches the authentication token from the first successful sign-in, but after reopening the workbook that token may be expired or invalid, and instead of triggering a fresh interactive login prompt, Excel attempts a silent reuse of the cached credentials and simply fails with “Authentication failed.” This is essentially a token refresh/credential cache handling limitation in certain Excel builds rather than a configuration mistake on your side. Clearing credentials works because it forces a full re-authentication flow, but as you noticed, it’s only temporary. The issue is often tied to specific Office versions and how they handle modern authentication (WAM vs ADAL), and tends to be more visible with Import connections than live connections. In practice, the only stable mitigations are keeping Excel fully updated, ensuring consistent account context (same Entra account in Windows + Office), or switching to a connection method that forces interactive auth when needed, because Excel currently doesn’t reliably prompt again once the cached token silently fails.
Hi Poojara_D12,
Thank you for reviewing.
This is machine-specific, not user or version-specific. A colleague using the same Office version (2602, Build 19725.20170), same Entra account setup, and the same workbook has no issues on his laptop. When he logged into my laptop with his own account, he experienced the same failure. This rules out user profile, Office version and AAS configuration.
The issue is specific to Power Query's AnalysisServices.Database connector. On the same machine:
- Power Query connecting to Azure SQL Database >> credentials persist fine
- Traditional Analysis Services connection (Get Data >> From Database >> From Analysis Services, non-Power Query path) >> works reliably across sessions
- Power BI Desktop with the same AAS model >> works fine
- Only Power Query Import via the SSAS connector >> token does not persist
I have already tried: full Office reinstallation, credential cleanup (Data Source Settings + Credential Manager), full Office sign-out/sign-in, and reinstalling the Entra WAM plugin via PowerShell. None resolved the issue persistently.