cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

I have an Azure storage account, and I need to list the containers on that storage account using scala from databricks notebook

ebg
New Contributor III

I tried to run azure-cli on databricks (i am using Credential passthrough and my account needs MFA ) and do the following code:

az storage container list --account-name "account_name" --auth-mode login --query "[].name" --output tsv

However, it outputs the following error:

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CP4XQ7YMD to authenticate.

ERROR: AADSTS70016: OAuth 2.0 device flow error. Authorization is pending. Continue polling.

Trace ID: a950d1bc-d7c0-43c6-8f92-09f108756c02

Correlation ID: 62d21988-966e-46ec-a300-fe7101c1e64e

Timestamp: 2022-10-12 09:31:45Z

Interactive authentication is needed. Please run:

az login

any other way I can list all the containers in a storage account?

3 REPLIES 3

Matt101122
Contributor

@elias bou ghosnโ€‹ see if any of these options are helpful: https://docs.databricks.com/external-data/azure-storage.html

PriyaAnanthram
Contributor III

dbutils.fs.ls after mounting the adls gen2 should work I think

Anonymous
Not applicable

Hi @elias bou ghosnโ€‹ 

Hope all is well!

Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.