User Profile
melsheikh
Microsoft Employee
Joined 16 days ago
User Widgets
Contributions
Re: Fabric Snowflake connector returns "Invalid credentials" with Key-Pair despite valid key pair
Hi Pulendar1 This is the notebook that works, where I was able to connect to snowflake from Fabric notebook import snowflake.connector con = snowflake.connector.connect( account="OHHHHPJ-NT42852", user="MELSHEIKH", private_key_file="/lakehouse/default/Files/rsa_key.p8", warehouse="COMPUTE_WH", role="ACCOUNTADMIN", insecure_mode=True) cur = con.cursor() cur.execute("SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER LIMIT 1000") cols = [c[0] for c in cur.description] rows = cur.fetchall() con.close() spark.createDataFrame(rows, schema=cols) \ .write.mode("overwrite").saveAsTable("customer_from_snowflake") print("Done — table 'customer_from_snowflake' written to the Lakehouse.") And this is what I get when we try to connect to Snowflake from Fabric copy job. Invalid credentials. We also tried with gateway and without gateway option. Am I missing something?93Views0likes2CommentsRe: Fabric Snowflake connector returns "Invalid credentials" with Key-Pair despite valid key pair
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 Gen2293Views0likes1CommentFabric Snowflake connector returns "Invalid credentials" with Key-Pair despite valid key pair
The Fabric Snowflake connector fails with "Invalid credentials" when using Key-Pair authentication, in both Dataflow Gen2 and the Copy job. The same key pair authenticates successfully outside Fabric (Snowflake Python connector returns a valid session), which proves the credentials, private key, username, account, and warehouse are all correct. The failure occurs both on the cloud connection and through an on-premises data gateway (routing via a different network), which rules out a network/OCSP cause and points to a defect in the connector's key-pair handling. Environment Snowflake trial account UAE Region DESC USER confirms HAS_KEYPAIR = TRUE, RSA_PUBLIC_KEY_FP populated, no MFA, no auth/network policy Fabric region: UAE, Connector Implementation 2.0, on-prem data gateway (latest version) Steps to reproduce Create a Snowflake connection (Dataflow Gen2 or Copy job), Authentication kind = Key-pair, upload unencrypted PKCS#8 private key. Server tried in both forms: XXXXX-XXXXXX.snowflakecomputing.com and XXXXX.uae-north.azure.snowflakecomputing.com. Result: "Invalid credentials." Same result with an on-premises data gateway. Proof credentials are valid The identical private key + account + user authenticate successfully via snowflake-connector-python (returns CURRENT_USER=myuser, CURRENT_ACCOUNT=myaccount, CURRENT_ROLE=ACCOUNTADMIN). Data was successfully loaded Snowflake → Lakehouse via a Fabric Notebook using the same key. Expected: Key-pair connection succeeds (as it does in every non-Fabric client). Actual: "Invalid credentials" in both native connectors, cloud and gateway. Screenshots: Dataflow Gen2 connection dialog, Key-pair + gateway + "Invalid credentials": 2. Copy job connection dialog — Key-pair + gateway + "Invalid credentials": 3.DESC USER MELSHEIKH showing HAS_KEYPAIR = TRUE / RSA_PUBLIC_KEY_FP Is there any known issue regarding Fabric Dataflow Gen2 and Fabric Copy job connection to Snowflake?385Views1like12Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.