How to use Manged Identitify within Databricks Azure to access Blob Container?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 06:39 AM
Hi,
My organization has asked that all blob storage accounts be accessed via managed identity. Several data brick notebooks are affected, so I'm currently trying to see how to set up a managed identity.
We've added the Databricks resource provider to the managed identity with Contributor access; however, when accessing blob resources, we get a resource not found error. I don't believe the access is being passed to the cluster, and I am struggling of find relevant documentation for this use case
from azure.identity import DefaultAzureCredential
from azure.storage.blob import BlobServiceClient
# Create a credential object
credential = DefaultAzureCredential()
# Construct the blob service client
blob_service_client = BlobServiceClient(
account_url=f"https://{storage_account_name}.blob.core.windows.net",
credential=credential
)
blob_service_client.list_containers()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 06:49 AM
Have you followed the instructions available in docs https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/azure-managed-ident...

