Forum Discussion
Excel authentication token reuse for access to Log Analytics
I have noticed that Excel is not able to reuse the authentication token when accessing Log Analytics workspaces if an expired token was renewed for a single sheet in a workbook.
Scenario:
- 1 workbook with 1+ worksheets
- Each worksheet is a different query to LA (KQL query displayed in Excel for ease and consolidation)
- Access to LA is protected by the usual access controls (Conditional Access; Security Reader role + Session control)
- After a period of time, session and token expire and require renewal
- User receives a prompt stating the token has expired and needs to be renew
- User clicks on "Sign-in" and successfully completes the prompts (u/n+pwd+MFA)
Expected result:
- The new token will be reused for subsequent connections to LA within the same workbook
Actual result:
- User is prompted to re-authenticate for each and every connection in the workbook resulting in as many auth requests as there are connections
Workaround:
- After successfully completing the first auth request, close Excel and re-open it and run "Refresh all"
- This successfully completes refresh of all data without any additional re-auth requests
Is this behaviour by design or due to a configuration? Is there a way to address this so that the first token is re-used by all other connections without having to close and reopen the workbook?
1 Reply
This behavior is intentional. Excel’s Power Query connectors, including the Log Analytics connector, manage authentication on a per‑connection basis rather than at the workbook level. When an authentication token expires, each query connection initiates its own renewal process, which results in repeated sign‑in prompts across multiple worksheets. The workaround you identified closing and reopening Excel effectively resets all connections so they can share the newly refreshed token. However, within an active workbook session, Excel does not support native reuse of a renewed token across multiple queries.
https://learn.microsoft.com/en-us/power-query/connector-authentication
https://learn.microsoft.com/nb-no/azure/azure-monitor/logs/log-excel