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
Greetings,
I encountered this exact issue and wanted to share the solution that worked for me, as this appears to be one of the few discussions covering it.
In my scenario, I was using a Service Account (SA) to maintain the connection for our organization. When attempting to connect through Fabric using key-pair authentication, I consistently received an "Invalid credentials" error.
What made this particularly confusing was that the same key-pair worked without any issues in a standalone Python script. Additionally, I could not find any login attempts in the SF history when testing through Fabric, which suggested the authentication process was failing very early.
During my testing, I observed the following:
- Personal account using Microsoft authentication: Successful
- Service account using Microsoft authentication: "Invalid credentials"
- Service account using key-pair authentication: "Invalid credentials"
I compared the configuration of both accounts and eventually discovered that the service account did not have a default role or default warehouse assigned.
After configuring both a default role and a default warehouse for the service account, the connection succeeded, including when using key-pair authentication.
If you're experiencing an "Invalid credentials" error in Fabric, despite the same key-pair working elsewhere, it may be worth checking whether the account has a default role and default warehouse configured. In my case, this was the root cause of the issue.
Hope this will work for you as well!