简体   繁体   中英

Azure blob storage python upload file with client id and secret

I am using credentials obtained from App Registration in azure portal.

Client secrets is generated, that provides Secret ID and Secret Value.

How can I use this to upload file to blob storage? i cannot find any exisitng python example

If you have client id and secret, first thing you would need to do is create an instance of ClientSecretCredential using client id, secret and tenant id. Please note that this is available in azure-identity package.

Once you have that, then you can simply use the credentials to create an instance of BlobClient and then use upload_blob method to upload the blob.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM