Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
My personal account to login to Snowflake website requires MFA so it won't work as user/password in PowerBI snowflake connector. My PowerBI Version is 2.153.910.0 64-bit (April 2026) and it has option for key authentication. My snowflake service account with encrypted p8 key works with Python and SQLTools in VS Code while its decrypted counterpart p8 key works in odbc.ini (isql). However, both encrypted/decrypted p8 keys in PowerBI snowflake connector give me "Failed to parse PEM block containing the private key". How to make it work?
[DPS_XXXX_XXXX] in odbc.ini:
Driver=/usr/lib64/snowflake/odbc/lib/libSnowflake.so
Server=cga19429.us-west-2.privatelink.snowflakecomputing.com
Database=DPS_XXXX_XXXX_MRT
Warehouse=DPS_XXXX_XXXX_ETL_WH
Role=DPS_XXXX_XXXX_ETL
UID=DPS_PYTHON_PROD_XXX_XXXX_SVCACCT
Authenticator=SNOWFLAKE_JWT
PRIV_KEY_FILE=/prod1/python_projects/Certs/DPS_PYTHON_PROD_XXX_XXXX_SVCACCT_rsa_key_decrypted.p8
Settings for PowerBI snowflake connector:
Server: cga19429.us-west-2.privatelink.snowflakecomputing.com
Warehouse: DPS_XXXX_XXXX_ETL_WH
Database: DPS_XXXX_XXXX_MRT
Auth: Key‑pair authentication
Username: DPS_PYTHON_PROD_XXX_XXXX_SVCACCT
Private key: C:\Users\f79tvh6\Documents\certs\DPS_PYTHON_PROD_XXX_XXXX_SVCACCT_rsa_key_decrypted.p8
| Key file | rsa_key.p8 | rsa_key_decrypted.p8 |
| Passphrase | Yes | No |
| Starting Line | -----BEGIN ENCRYPTED PRIVATE KEY----- | -----BEGIN PRIVATE KEY----- |
| Used | Python; SQLTools in VS Code | ODBC & ISQL |
Solved! Go to Solution.
From what you posted, the Private Key field in the Power BI Snowflake connector has the file path (C:\Users\...\rsa_key_decrypted.p8) instead of the actual key text. That field expects the PEM contents, not a path, so it tries to parse the path string as a PEM block and fails with exactly the error you are seeing.
Open the .p8 file in a plain text editor, copy the entire contents including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines and the line breaks in between, and paste that into the Private Key field. If you go with the encrypted key, also fill in the passphrase field. Make sure no extra spaces or blank lines are added at the start or end when pasting.
If this helped, please mark it as the accepted solution and give it a thumbs up.
Best,
Shai Karmani
The authentication failed at first with pasted key contents because of missing Role. Once Role is added in Advanced options, authentication is successful.
Thanks.
Hi @bergen288,
Thank you @stoic-harsh and @Shai_Karmani for your responses to the query.
Following up to check whether you got a chance to review the suggestions given. If the issue still persists please let us know. Glad to help.
Thank you.
Hey @bergen288,
The paste-vs-path theory is worth trying, but Power BI 2.153.910.0 uses a file picker. It reads the file contents internally, so that might not be the root cause. If it doesn't work, try to:
1. Re-export the key cleanly via OpenSSL (will prompt for your key passphrase):
openssl pkcs8 -in rsa_key.p8 -topk8 -nocrypt -out rsa_key_powerbi.p82. Fix line endings. The .p8 was generated on Linux (LF) but Power BI's .NET PEM parser expects CRLF. Run on either platform (ensure windows has unix2dos installed):
unix2dos rsa_key_powerbi.p8Then use rsa_key_powerbi.p8 in Power BI with the passphrase field left blank.
Best,
Harshit
From what you posted, the Private Key field in the Power BI Snowflake connector has the file path (C:\Users\...\rsa_key_decrypted.p8) instead of the actual key text. That field expects the PEM contents, not a path, so it tries to parse the path string as a PEM block and fails with exactly the error you are seeing.
Open the .p8 file in a plain text editor, copy the entire contents including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines and the line breaks in between, and paste that into the Private Key field. If you go with the encrypted key, also fill in the passphrase field. Make sure no extra spaces or blank lines are added at the start or end when pasting.
If this helped, please mark it as the accepted solution and give it a thumbs up.
Best,
Shai Karmani
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 18 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 50 | |
| 38 | |
| 31 | |
| 27 |