Recently I got a requirement to connect to ADLS Gen2 and download all the files from ADLS to a linux machine. I had prepared a python program that connects to the storage account using connection string. But when I requested the connection string, the IT team told me that they cannot provide the connection string and they requested me to connect using a service principle. So I had to modify the program to make it connect using service principle.
We need two python packages to run this program. The packages are given below.
azure-storage-blob
azure-identity
The core part of the program that establishes connection to the storage account is given below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Awesome content bro.. it really helped me a lot. thanks
Happy to hear that the tip was helpful.