Skip to main content

Connect PowerBI to Snowflake with an RSA key pair

Legacy user is now longer working - 2FA Required

Written by Knut Hauge

Customer guide. Snowflake has phased out password login for this type of user account. To connect Power BI to your data you now need to use an RSA key pair: you create two keys on your own machine, send us the public key, and use the private key when you sign in to Power BI.

It takes about 10 minutes. Follow the four parts below in order.

Part 1 – Create the key pair

You need the OpenSSL tool.

  • Windows: OpenSSL comes with "Git for Windows". Download it from git-scm.com/download/win, install with the default options, and open the program "Git Bash".

  • Mac/Linux: OpenSSL is already installed. Open Terminal.

Run these two commands – one at a time (copy, paste, press Enter):

openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt  openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub

You now have two files in the folder you are in:

File

What it is

What you do with it

rsa_key.p8

Private key (secret)

Keep it yourself. Never share it.

rsa_key.pub

Public key

Send it to us (see Part 2).

Optional – password-protected key: For extra security you can drop -nocrypt from the first command. You will then be asked to set a password (passphrase). Remember it – you will need to enter it in PowerBI later.

Part 2 – Send us the public key

  1. Open rsa_key.pub in Notepad / a text editor, or attach the file itself.

  2. Send it to us by email. The public key is not secret, so ordinary email is perfectly fine.

Important: Never send the private key (rsa_key.p8) to us or anyone else. We do not need it, and it should never leave your machine.

We register the public key on your Snowflake user and let you know when it is active. At the same time you will receive these values, which you need in Part 4:

Value

Example

Server (account URL)

xxxxx.eu-west-2.aws.snowflakecomputing.com

Username

YOUR_USERNAME

Warehouse

DILLER

Role

YOUR_ROLE_NAME

Part 3 – Look after the private key

Put rsa_key.p8 in a fixed, secure location on your machine – for example:

C:\Users\<your-username>\.snowflake\rsa_key.p8
  • Do not put it in shared folders (e.g. shared Dropbox/OneDrive areas that others can access).

  • Do not send it by email or chat.

  • Power BI reads the file from this path every time you refresh data, so it must stay there.

Part 3.5 - Alter current diller_reader user

You need to update the current diller_reader user before you can log on with with it using a serice like PowerBi.

  • Log into Snowflake

  • Start new SQL file

  • Run these commands:

    • USE ROLE ACCOUNTADMIN;
      ​

    • ALTER USER DILLER_READER SET RSA_PUBLIC_KEY='<your pub key here>';
      ​

      In WinBash you can see this text with this command: grep -v "PUBLIC KEY" rsa_key.pub | tr -d '\n'; echo
      ​

    • ALTER USER DILLER_READER UNSET PASSWORD;

    • ALTER USER DILLER_READER SET TYPE = SERVICE;

Part 4 – Connect in PowerBI

Requires an up-to-date PowerBI Desktop (2025 version or newer). If yours is older, update first – otherwise the key-pair option won't appear.

  1. In Power BI Desktop: Get data → Snowflake.

  2. Server: the account URL we gave you (e.g. xxxxx.eu-west-2.aws.snowflakecomputing.com).

  3. Warehouse: the value we gave you (e.g. DILLER).

  4. Optionally expand Advanced options and set Role to the value we gave you.

  5. Click OK. On the sign-in screen, choose Key Pair.

  6. Username: the value we gave you.

  7. Private key: point to your rsa_key.p8 file.

  8. Passphrase: leave blank – unless you created a password-protected key in Part 1, in which case enter the password.

  9. Click Connect. The Navigator window opens your databases and tables.

Done. You are now connected with key-pair authentication.

If you get the error "We cannot convert the value null to type Text"

This is a known bug in the June 2026 release of Power BI Desktop – it has nothing to do with your key (you are in fact signed in). Fixes, in order of preference:

  1. Update Power BI Desktop to the latest version.

  2. Alternatively: roll back to the May 2026 version of Power BI Desktop.

  3. Alternatively: connect via the Snowflake ODBC driver instead of the built-in connector.

Contact us if you hit this – we'll help you further.

Quick checklist

Step

Action

1

Create the key pair with the two OpenSSL commands (Part 1).

2

Send us rsa_key.pub (Part 2). Keep rsa_key.p8 yourself.

3

Store rsa_key.p8 in a fixed, secure location (Part 3).

4

Wait for confirmation + connection details from us.

5

Connect in Power BI with the key pair (Part 4).

Did this answer your question?