Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
Hi Zhilin Song,
Thanks for reaching out to Microsoft Q&A.
If you do not have access to app registration and cannot create a service principal for authentication, you can still connect Databricks to your Azure Storage account using other methods, depending on your permissions and setup. Here are some alternatives:
- Access Keys:
- If you have access to the storage account access keys, you can use them directly in Databricks to authenticate.
- You can mount the storage account in Databricks using the access key as given in the example below. This method does not require app registration but does require access to the storage account keys.
dbutils.fs.mount( source = "wasbs://<container>@<storage_account>.blob.core.windows.net/", mount_point = "/mnt/<mount_name>", extra_configs = {"fs.azure.account.key.<storage_account>.blob.core.windows.net": "<storage_account_access_key>"} )
- SAS Keys:
- If you cannot use access keys, your administrator can generate a SAS for the storage account, granting limited-time access to the specific resources you need. SAS tokens provide more granular control and do not require app reg.
dbutils.fs.mount( source = "wasbs://<container>@<storage_account>.blob.core.windows.net/?<sas_token>", mount_point = "/mnt/<mount_name>" )
- Azure Managed Identity (If available):
- If your Databricks workspace is running on a cluster with MI enabled, you can authenticate using the MI without needing app registration.
- In this case, ensure that the MI is assigned the correct permissions to the Storage Account, such as the Storage Blob Data Contributor role.
dbutils.fs.mount( source = "abfss://<container>@<storage_account>.dfs.core.windows.net/", mount_point = "/mnt/<mount_name>", extra_configs = { "fs.azure.account.auth.type.<storage_account>.dfs.core.windows.net": "ManagedIdentity", "fs.azure.account.oauth2.msi.service.principal.id": "<managed_identity_client_id>" } )
If none of the above methods are available or appropriate for your environment, you will need to work with your administrator. They can either...
- Provide access to the necessary app registration or service principal.
- Set up access keys or SAS tokens for you.
- Enable and configure MI for your Databricks environment.
In summary, if you don't have access to app registration, your administrator can help set up access via Managed Identity, Access Keys, or SAS tokens, or directly assign the necessary permissions.
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.