Tuesday 10 May 2022

Power Query authentication issues refreshing queries

Power Query is an extremely handy tool, especially now that it's baked into Excel, but it has an annoying tendency to not show system dialog boxes when it can't authenticate to datasources.

A common error is "Exception of type 'Microsoft Mashup Engine.Interface.ResourceAccessForbiddenException' was thrown" although there are probably many more.

In order to do a turn-it-off-and-back-on-again reset of the stored (and failing) authentication credentials:

1. Go to Data -> Queries & Connections and right click on a query and edit it.  T|his should bring up the query editor.

2. Then click on data source settings and Global Permissions. Select all the data sources listed and click edit permissions

3. Under credentials, click edit and select a different type of authentication and click save.  Then go back in and re-select the right one, signing or entering username/password as appropriate.

4. Then select the appropriate Privacy Level.  If it's not a confidential document you can just choose None.

5. You may need to repeat for the "data sources in current workbook" although Global Permissions to take precedence

Close the dialogue and refresh the queries.