Py4JError: ('Method public com.databricks.backend.daemon.dbutils.DBUtilsCore$Result com.databricks.backend.daemon.dbutils.DBUtilsCore.mount() is not whitelisted on class class com.databricks.backend.daemon.dbutils.DBUtilsCore',)

karingali jayanthi 0 Reputation points
2026-07-14T17:09:11.2566667+00:00

HI,

I am trying to make connection from azure blob storage to data bricks using mount point connection ,i am getting error,

can you please any one help me in resolving this error. please find my code snippet below.

image

Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 11,350 Reputation points Microsoft External Staff Moderator
    2026-07-14T20:55:59.5366667+00:00

    Hi @karingali jayanthi

    Thank you for reaching out.

    The error:

    
    

    indicates that the dbutils.fs.mount() operation is restricted in your current Databricks environment. This is commonly seen when using Unity Catalog-enabled workspaces or clusters with Shared/Standard access mode, where mount operations are not supported due to security restrictions.

    To help determine the exact cause, could you please provide the following information?

    • Is your workspace enabled with Unity Catalog?
    • What is the Databricks Runtime (DBR) version of the cluster?
    • What is the cluster access mode (Shared, Standard, or Dedicated/Single User)?
    • Are you connecting to Azure Blob Storage (blob.core.windows.net) or Azure Data Lake Storage Gen2 (dfs.core.windows.net)?

    If your workspace is Unity Catalog-enabled, the recommended approach is to access storage using Storage Credentials and External Locations rather than dbutils.fs.mount().

    Once we have the above details, we'll be happy to assist you further.

    Was this answer helpful?


  2. AI answer

    2026-07-14T17:09:31.24+00:00

    dbutils.fs.mount() is supported, but Databricks recommends moving away from mounts. It is not compatible with Databricks serverless compute architecture, and the error shown indicates the mount() method is not allowed in the current compute environment.

    Use one of these paths:

    1. If running on serverless compute
      • Do not use dbutils.fs.mount().
      • Access the storage directly with an abfss:// URI instead.
      • Databricks recommends the abfss driver for greater security.
      • Example:
             spark.read.load("abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/<path-to-data>")
             
             dbutils.fs.ls("abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/<path-to-data>")
        
    2. If a mount is still required
      • Use non-serverless compute.
      • For ADLS Gen2 with ABFS, hierarchical namespace (HNS) must be enabled on the storage account.
      • If the mount is created on one cluster and needs to be used on another running cluster, run:
             dbutils.fs.refreshMounts()
        
    3. If using Azure Synapse Spark instead of Azure Databricks
      • The mount API is different:
             mssparkutils.fs.mount(
                 "abfss://mycontainer@<accountname>.dfs.core.windows.net",
                 "/test",
                 {"linkedService": "mygen2account"}
             )
        

    Important notes:

    • Databricks recommends using Unity Catalog external locations with external volumes instead of dbutils.fs.mount().
    • All users in the Azure Databricks workspace can access a mounted ADLS account.
    • If mounted storage relies on a secret that is rotated, expires, or is deleted, errors such as 401 Unauthorized can occur; the storage must be unmounted and remounted.
    • Avoid unmounting while production jobs are running because it can cause errors.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.