Error "Invalid configuration value detected for fs.azure.account.keyInvalid configuration value detected for fs.azure.account.key" when listing files stored in an Azure Storage account using "dbutils.fs.ls"

Mohammad Saber 591 Reputation points
2023-06-21T11:09:15.6666667+00:00

Hi,

I want to get a list of files stored in an Azure Storage account using "dbutils.fs.ls" command in Databricks. But, I get the following error.

Failure to initialize configuration for storage account AAAAAA.dfs.core.windows.net: Invalid configuration value detected for fs.azure.account.keyInvalid configuration value detected for fs.azure.account.key

0

Databricks workspace:

Unity catalog is enabled.

There is a catalog named Exploration. User has "ALL PRIVILEGES" grant on this catalog.

User's image

Storage Account:

Azure storage account: ADSL Gen2

User has "Read/Write/Execute" to the root folder "Exploration". Also, user has the same access to the sub-folder "test".

3

2

What do I need to do to be able to list the files?

Notes:

  • I am able to create sub-folders in the root folder Exploration.
  • I can upload files to the Azure storage account.
    When I try to list files in the root folder, I get another error:

4

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,393 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,345 questions
0 comments No comments
{count} vote

Accepted answer
  1. PRADEEPCHEEKATLA 90,556 Reputation points
    2023-06-23T05:15:45.44+00:00

    @Mohammad Saber - Thanks for the question and using MS Q&A platform.

    Regarding the first error message: Failure to initialize configuration for storage account AAAAAA.dfs.core.windows.net: Invalid configuration value detected for fs.azure.account.keyInvalid configuration value detected for fs.azure.account.key

    This is a known issue that - you can't use storage account access key to access data using the abfss protocol.

    User's image

    Reason: You can't use storage account SAS Token to access data using the abfss protocol. You need to provide more configuration options if you want to use abfss - it's all described in documentation.

    For more details, refer to the below links:

    https://stackoverflow.com/questions/69825487/error-invalid-configuration-value-detected-for-fs-azure-account-key
    https://medium.com/@kyle.hale/troubleshooting-invalid-configuration-value-detected-for-fs-azure-account-key-6c6fcc67b217

    Regarding the second error message: Input path url xxxxxxxxxx overlaps with managed storage.

    Running the list command on a managed directory is not supported in Unity Catalog. Catalog/schema storage locations are reserved for managed storage.

    For more details, refer to the below links:
    https://kb.databricks.com/en_US/unity-catalog/invalid_parameter_valuelocation_overlap-overlaps-with-managed-storage-error

    https://community.databricks.com/s/question/0D58Y00009wikefSAA/dbutilsfsls-doesnt-work-on-unity-catalog-managed-location

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Aman Sehgal 0 Reputation points
    2024-02-27T01:11:37.9033333+00:00

    Change your databricks cluster to 12.2 LTS and above to resolve this error.

    0 comments No comments

Your answer

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