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.

Monday 7 March 2022

Configuring Hashicorp repositories in Linux Mint (and other Ubuntu based distributions)

Hashicorp distributes Packer and Terraform as both binaries and packages for popular Linux distributions.  

They also have a handy apt repository for use with Ubuntu and Debian, but it generates a 404 error during apt-get update with other derivatives:

e.g.
Err: 9 https://apt.releases.hashicorp.com ulyssa Release
404  Not Found [IP: 151.101.2.49 443]

The reason is the respository only appears to contain branches for the Ubuntu and Debian codenames.

The solution is to edit the sources list and change it to use the equivalent Ubuntu/Debian codename instead:

  • Edit /etc/apt/sources.list.d/additional-repositories.list with your text editor of choice
  • The line that contains apt.releases.hashicorp.com will have the distribution codename in it
    • e.g. for Linux Mint 20.1 which has codeame ulyssa:
    • deb [arch=amd64] https://apt.releases.hashicorp.com ulyssa main
    • (use lsb_release -a to identify the codename)
  • Change the codename in the entry to the equivalent Ubuntu or Debian codename
    • deb [arch=amd64] https://apt.releases.hashicorp.com focal main
Then update the apt repository list and it should find the packages when you try to install Terraform or Packer with apt-get install