Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello !
In December, I added the Snowflake SSH connection to my reports. However, since yesterday, I have been getting an error: "Expression.Error: ADBC: [Snowflake] 390144 (08004): JWT token is invalid. "
This error only occurs on my desktop; my colleagues have no connection issues and refreshes work fine online.
My version of PBI is 2.149.1429.0
I have uninstalled and reinstalled PBI, cleared all caches, and updated my entire PC, but nothing has changed.
If you can help me, that would be great because it's holding me back in my work.
Have a nice day !
Solved! Go to Solution.
Hi @Ybam ,
Since this issue is specific to your Desktop environment (while colleagues and the Service are working fine), this confirms the issue is local configuration, not the Snowflake account or the Key Pair itself.
The error JWT token is invalid coupled with "only on my machine" strongly points to a Time Synchronization issue or a Key Formatting issue handled by the local driver.
Here is the comprehensive troubleshooting guide, ordered from most likely to least likely.
This is the cause 90% of the time for local JWT failures. Snowflake Key Pair authentication generates a JWT (JSON Web Token) with a very short lifespan (typically 60 seconds). If your laptop's clock is even 1 minute behind or ahead of the Snowflake server time, the token generated by Power BI will be rejected immediately as "expired" or "not yet valid."
Step 1: Right-click your Windows Taskbar clock > Adjust date/time.
Step 2: Click the Sync now button under "Synchronize your clock".
Step 3: Ensure "Set time automatically" and "Set time zone automatically" are ON.
Step 4: Restart Power BI and try again.
The ADBC driver (used in newer Power BI versions) is strict about how the Private Key is pasted or read. If you are copying the Private Key text directly into the Power BI connection dialog:
Header/Footer: Ensure the key includes the full headers: -----BEGIN ENCRYPTED PRIVATE KEY----- and -----END ENCRYPTED PRIVATE KEY-----
Whitespace: Sometimes copying from a text editor adds a trailing space or newline at the very end. Remove any empty lines after the footer.
Line Breaks: Power BI prefers the key to be a single line (without carriage returns) in the input field, OR perfectly formatted with standard PEM line breaks. Try removing line breaks to make it a one-liner string if the standard block format fails.
Sometimes Data Source Settings > Clear Permissions inside Power BI is not enough because the OS caches the underlying artifact.
Close Power BI.
Open the Control Panel > Credential Manager.
Select Windows Credentials.
Look for any entries related to Snowflake or PowerBI. Remove them.
Re-open Power BI and re-enter the credentials.
If your Power Query refers to a file path for the key, ensure that:
The file is not locked by OneDrive syncing or Antivirus scanning.
The path does not contain special characters that the ADBC driver might misinterpret.
Test: Try moving the .p8 file to a simple local path like C:\Keys\rsa_key.p8 to rule out path parsing errors.
If the new ADBC driver (indicated by your error message) is failing due to a bug in the specific Power BI version (2.149...), you can try to force the legacy ODBC driver if you have the Snowflake ODBC driver installed on your machine.
In Power Query, instead of Snowflake.Databases(...), try checking if you can specify the option: Snowflake.Databases("server", "warehouse", [Implementation="ODBC"]) (Note: This might not support KeyPair natively in the UI, but helps isolate if the issue is the ADBC driver).
Summary: Start with Time Sync. It is the most common reason why a valid setup suddenly stops working on one machine while working everywhere else.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
Hi @Ybam ,
Since this issue is specific to your Desktop environment (while colleagues and the Service are working fine), this confirms the issue is local configuration, not the Snowflake account or the Key Pair itself.
The error JWT token is invalid coupled with "only on my machine" strongly points to a Time Synchronization issue or a Key Formatting issue handled by the local driver.
Here is the comprehensive troubleshooting guide, ordered from most likely to least likely.
This is the cause 90% of the time for local JWT failures. Snowflake Key Pair authentication generates a JWT (JSON Web Token) with a very short lifespan (typically 60 seconds). If your laptop's clock is even 1 minute behind or ahead of the Snowflake server time, the token generated by Power BI will be rejected immediately as "expired" or "not yet valid."
Step 1: Right-click your Windows Taskbar clock > Adjust date/time.
Step 2: Click the Sync now button under "Synchronize your clock".
Step 3: Ensure "Set time automatically" and "Set time zone automatically" are ON.
Step 4: Restart Power BI and try again.
The ADBC driver (used in newer Power BI versions) is strict about how the Private Key is pasted or read. If you are copying the Private Key text directly into the Power BI connection dialog:
Header/Footer: Ensure the key includes the full headers: -----BEGIN ENCRYPTED PRIVATE KEY----- and -----END ENCRYPTED PRIVATE KEY-----
Whitespace: Sometimes copying from a text editor adds a trailing space or newline at the very end. Remove any empty lines after the footer.
Line Breaks: Power BI prefers the key to be a single line (without carriage returns) in the input field, OR perfectly formatted with standard PEM line breaks. Try removing line breaks to make it a one-liner string if the standard block format fails.
Sometimes Data Source Settings > Clear Permissions inside Power BI is not enough because the OS caches the underlying artifact.
Close Power BI.
Open the Control Panel > Credential Manager.
Select Windows Credentials.
Look for any entries related to Snowflake or PowerBI. Remove them.
Re-open Power BI and re-enter the credentials.
If your Power Query refers to a file path for the key, ensure that:
The file is not locked by OneDrive syncing or Antivirus scanning.
The path does not contain special characters that the ADBC driver might misinterpret.
Test: Try moving the .p8 file to a simple local path like C:\Keys\rsa_key.p8 to rule out path parsing errors.
If the new ADBC driver (indicated by your error message) is failing due to a bug in the specific Power BI version (2.149...), you can try to force the legacy ODBC driver if you have the Snowflake ODBC driver installed on your machine.
In Power Query, instead of Snowflake.Databases(...), try checking if you can specify the option: Snowflake.Databases("server", "warehouse", [Implementation="ODBC"]) (Note: This might not support KeyPair natively in the UI, but helps isolate if the issue is the ADBC driver).
Summary: Start with Time Sync. It is the most common reason why a valid setup suddenly stops working on one machine while working everywhere else.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
@Ybam , I am assuming the issue happens on Power BI Desktop.
And hope you have already tried -> Home -> Transform Data -> Data Source Settings -> and clear permission, and after that provide credentials again
On Service make sure you have access to connection. Setting -> Manager connections and Gateways -> and make sure connection is assigned to you
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |