Unable to add blob tags via iot blob upload
See original GitHub issueHi.
As the title states, I am unable to add blob tags to blobs uploaded via the iot hub.
Following your guide : https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/iot-hub/iot-hub-python-python-file-upload.md it should be as simple as
# Upload the specified file
with BlobClient.from_blob_url(sas_url) as blob_client:
with open(file_name, "rb") as f:
result = blob_client.upload_blob(f, overwrite=True)
blob_client.set_blob_tags({"test":"tag"})
return (True, result)
However this yields a
<Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.
On the other hand i am able to add metadata
# Upload the specified file
with BlobClient.from_blob_url(sas_url) as blob_client:
with open(file_name, "rb") as f:
result = blob_client.upload_blob(f, overwrite=True)
blob_client.set_blob_metadata({"test":"tag"})
return (True, result)
Is there any workaround around this? Adding the correct permissions to the iothub for instance. I know this does not fit in the python sdk per se, but if you can point me to the correct repository to post this then ill gladly reupload.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Azure IoT Blob upload troubleshooting - Microsoft Q&A
I have setup Azure IoT Edge and a module for Azure IoT Blob storage. I have added about 12 containers that I want...
Read more >Unable to View Contents of IoT Edge Device's Blob Storage ...
I have an IoT Edge device running a local blob storage module. When updating to v1.15.1, I can now no longer connect to...
Read more >Unable to Download all the Blobs in a container from Azure ...
I have been trying to download 5 files uploaded as blobs already in azure cloud in container: updateappnew via a nodejs script.
Read more >Do's and Don'ts for Streaming File Uploads to Azure Blob ...
NET MVC for uploading large files to Azure Blob Storage ... got through. we can't do it until after the upload because we...
Read more >Azure Blob Storage by Microsoft | Docker Hub
Release Date: 02-Feb-2021 · Return blob creation time to avoid erroring out on newest .NET SDK (Azure.Storage. · Respect "create only" precondition for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @lev-i .
Im glad they are working on a fix.
For anyone else browsing this issue : Our fix is to have an azure function with a blob trigger, that takes the metadata and adds that as tags. It works, it is not very complex, but of course it would be a better solution if it was not there at all.
@petoor As Tim pointed out, this was an issue on the C# SDK. I don’t believe it was solved on there, and likely won’t be solved here either assuming the same constraints are present. I’ll reach out to that team and see if it’s been updated at all, and I’ll let you know what I find out.