07-05-2022 07:22 AM
We already know that we can mount Azure Data Lake Gen2 with OAuth2 using this:
configs = {"fs.azure.account.auth.type": "OAuth",
"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.azure.account.oauth2.client.id": "",
"fs.azure.account.oauth2.client.secret": dbutils.secrets.get(scope="",key=""),
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com//oauth2/token"}
# Optionally, you can add to the source URI of your mount point.
dbutils.fs.mount(
source = "abfss://@.dfs.core.windows.net/",
mount_point = "/mnt/",
extra_configs = configs)
However, when I used wasbs instead of abfss, it gives this error:
AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Unable to access container *** in account YYY.dfs.core.windows.net using anonymous credentials, and no credentials found for them in the configuration.
Caused by: AzureException: Unable to access container *** in account YYY.dfs.core.windows.net using anonymous credentials, and no credentials found for them in the configuration.
Is it possible to mount Azure Blob Storage (not ADLS2) by OAuth2?
07-05-2022 08:03 AM
OAuth is not supported on blob. We have a feature request DB-I-3479 for the same.
07-05-2022 08:03 AM
OAuth is not supported on blob. We have a feature request DB-I-3479 for the same.
07-07-2022 11:16 PM
Hi @John William, We haven't heard from you on the last response from @Prabakar, and I was checking back to see if his suggestions helped you.
Or else, If you have any solution, please share it with the community as it can be helpful to others.
Also, please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.
02-14-2024 07:16 AM
Is there any update on this feature request? OAuth still seems not to be working with Azure Blob Storage... Configuration works fine for ADLS gen 2, but for Azure Blob Storage still only SAS and Account key seems to be working.
07-03-2024 11:36 PM
Try replacing wasbs with abfss and dfs with blob in the URI, should work!
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group