1

Unable to connect to Azure Synapse from Azure Databricks - Notebook (PySpark) using JDBC, Using teh following JDBC url, getting exception:

jdbc:sqlserver://.sql.azuresynapse.net;database=;User Id=Authentication=ActiveDirectoryMSI;Use Encryption for Data=true;

Exception:

Caused by: java.lang.IllegalArgumentException: No JDBC credentials provided. You must specify JDBC credentials in either the URL or as user/password options, use Credential Passthrough, or set Service Principal Oauth2.0 authentication.

Code:

df.write \
      .format("com.databricks.spark.sqldw") \
      .option("url", "jdbc:sqlserver://<synapse server name>.sql.azuresynapse.net;database=<dedicated pool name>;User Id=<UserAssignedManageIdentity>Authentication=ActiveDirectoryMSI;Use Encryption for Data=true; 
") \
      .option("useAzureMSI","true") \
      .option("dbtable", "table_name") \
      .option("truncate","false") \
      .option("tempDir", "abfss://<azure_storage_name>@<container_name>.dfs.core.windows.net/tempDir") \
      .mode("overwrite") \
      .save()

What is the correct connection string to connect to Synapse using User Managed Service Identity.

Background:

  • User Managed Service Identity (umsi_synapse_user) been created
  • Assigned Contributor role to User Managed Service Identity to access Synapse
  • Created External user with User Managed Service Identity (umsi_synapse_user)
  • Assigned 'db_owner' role to umsi_synapse_user
1

1 Answer 1

0

There is no support for managed identity on Azure Databricks clusters (yet). So you need to use other authentication methods.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.