Forum Discussion
Fabric Snowflake connector returns "Invalid credentials" with Key-Pair despite valid key pair
- 2 months ago
Thank you v-saisrao-msft , I found the issue, in the connection it converted the server name to lower case although I added it in upper case, so when I used the lower case in the dataflow gen2 connection the connections I created in Settings > Manage Connections and Gateways appeared in the dropdown list. Thank you for your support
Thanks for your response, the username has the exact same value yes (case sensetive)
The exact same connections parameters works fine in Fabric notebook, the issue is in Copy Job and Dataflow Gen2
- v-saisrao-msft3 months ago
Community Support
Hi melsheikh,
Thanks for confirming. Since the same key pair and connection parameters work in both the Snowflake Python connector and a Fabric Notebook, and you've already confirmed you're using the same username, one additional thing to check is whether that username matches the user's LOGIN_NAME in Snowflake, as required for Key-Pair authentication. You could also review the output of SYSTEM$GET_LOGIN_FAILURE_DETAILS (or the Snowflake login history) to see the specific JWT validation error. Microsoft documentation confirms that Key-Pair authentication is supported for both Copy Job and Dataflow Gen2.
Set up your Snowflake database connection - Microsoft Fabric | Microsoft Learn
Snowflake connector overview - Microsoft Fabric | Microsoft Learn
Key Pair Authentication: Troubleshooting | Snowflake Documentation
Thank you.