cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access Azure blob storage with SAS token

bvraravind
New Contributor II

I am following Microsoft documentation to connect from Databricks workspace to Azure blob storage. but it is not working. Any help is greatly appreciated. Below is the code

spark.conf.set("fs.azure.account.auth.type.<storage-account>.dfs.core.windows.net", "SAS")
spark.conf.set("fs.azure.sas.token.provider.type.<storage-account>.dfs.core.windows.net", "org.apache.hadoop.fs.azurebfs.sas.FixedSASTokenProvider")
spark.conf.set("fs.azure.sas.fixed.token.<storage-account>.dfs.core.windows.net", dbutils.secrets.get(scope="<scope>", key="<sas-token-key>"))

It gives below error:

Configuration fs.azure.account.auth.type.tmpbricksteststorage1.dfs.core.windows.net is not available. JVM stacktrace: org.apache.spark.sql.AnalysisException at com.databricks.sql.connect.SparkConnectConfig$.assertConfigAllowed(SparkConnectConfig.scala:195) at org.apache.spark.sql.connect.service.SparkConnectConfigHandler$RuntimeConfigWrapper.set(SparkConnectConfigHandler.scala:89) at org.apache.spark.sql.connect.service.SparkConnectConfigHandler.$anonfun$handleSet$1(SparkConnectConfigHandler.scala:223) at org.apache.spark.sql.connect.service.SparkConnectConfigHandler.$anonfun$handleSet$1$adapted(SparkConnectConfigHandler.scala:221) at scala.collection.Iterator.foreach(Iterator.scala:943) at scala.collection.Iterator.foreach$(Iterator.scala:943) at scala.collection.AbstractIterator.foreach(Iterator.scala:1431) at
1 ACCEPTED SOLUTION

Accepted Solutions

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @bvraravind,

The error you are encountering is due to an incorrect configuration setting in your code. The error message indicates that the configuration fs.azure.account.auth.type.<storage-account>.dfs.core.windows.net is not recognized

  1. Verify that the SAS token is valid and has the necessary permissions.
  2. Ensure that the storage account and container names are correct.
  3. Check if there are any network restrictions or firewall rules that might be blocking access

Documentation: https://learn.microsoft.com/en-us/azure/databricks/connect/storage/azure-storage

View solution in original post

1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @bvraravind,

The error you are encountering is due to an incorrect configuration setting in your code. The error message indicates that the configuration fs.azure.account.auth.type.<storage-account>.dfs.core.windows.net is not recognized

  1. Verify that the SAS token is valid and has the necessary permissions.
  2. Ensure that the storage account and container names are correct.
  3. Check if there are any network restrictions or firewall rules that might be blocking access

Documentation: https://learn.microsoft.com/en-us/azure/databricks/connect/storage/azure-storage

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now