azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[BUG] Blob container's metadata is always empty when listed
Describe the bug
I'm using the Azure.ResourceManager.Storage sdk and the StorageManagementClient client, and calling client.BlobContainers.ListAsync. The returned list of ListContainerItem has a property called Metadata, which is basically the same as tags. The issue is that the Metadata I see on the blob container in the azure portal isn't in the returned ListContainerItem, instead it is always an empty IDictionary.
On the contrary, when I fetch the blob container with client.BlobContainers.GetAsync, the Metadata is returned correctly.
Expected behavior
The Metadata will be present in the returned ListContainerItem.
Actual behavior (include Exception or Stack Trace)
The Metadata property is an empty IDictionary.
To Reproduce
- Create a
StorageManagementClientclient. - Call
client.BlobContainers.ListAsync. - See that the Metadata is always empty
Environment:
- Azure.ResourceManager.Storage - 1.0.0-preview.2
- Windows 10, .NET Framework 5
- e.g. Visual Studio 16.8.3
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Just tested it, and this also happens for client.FileShares.ListAsync
@GalPillar Could you please provide HTTP request and response?
list request: request: GET https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Storage/storageAccounts/<storageAccountName>/blobServices/default/containers?api-version=2019-04-01 Authorization: Bearer <Token>
response is attached response.txt
get request: request: GET https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Storage/storageAccounts/<storageAccountName>/blobServices/default/containers/<containerName>?api-version=2019-06-01 Authorization: Bearer <Token>
response is attached getResponse.txt
@zfchen95
This looks a server issue: List container from SRP won't return container meta data ( But get single container from SRP will return meta data; list container from dataplane will also return meta data)
Would you please help to look?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
Issue Details
Describe the bug
I'm using the Azure.ResourceManager.Storage sdk and the StorageManagementClient client, and calling client.BlobContainers.ListAsync. The returned list of ListContainerItem has a property called Metadata, which is basically the same as tags. The issue is that the Metadata I see on the blob container in the azure portal isn't in the returned ListContainerItem, instead it is always an empty IDictionary.
On the contrary, when I fetch the blob container with client.BlobContainers.GetAsync, the Metadata is returned correctly.
Expected behavior
The Metadata will be present in the returned ListContainerItem.
Actual behavior (include Exception or Stack Trace)
The Metadata property is an empty IDictionary.
To Reproduce
- Create a
StorageManagementClientclient. - Call
client.BlobContainers.ListAsync. - See that the Metadata is always empty
Environment:
- Azure.ResourceManager.Storage - 1.0.0-preview.2
- Windows 10, .NET Framework 5
- e.g. Visual Studio 16.8.3
| Author: | GalPillar |
|---|---|
| Assignees: | JonathanCrd, nisha-bhatia |
| Labels: |
|
| Milestone: | - |
We currently don't include metadata in list blob containers in management plane API. We will add it in a future release. For list file shares, we will need to update the swagger. The feature is available at the server level.
Hi @GalPillar. Thank you, for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.
Hi @GalPillar. There was a mistake and this issue was unintentionally flagged as a stale pull request. The label has been removed and the issue will remain active; no action is needed on your part. Apologies for the inconvenience.
@blueww, any updates?
@seankane-msft This is SRP server issue, not SRP .net SDK issue. So only SRP team can fix it.
You can see @zfchen95 comments above. @zfchen95, will SRP team fix the issue from SRP server?
@zfchen95 can you please answer the above query?
Hi! any update on this issue ? @amnguye @zfchen95
@blueww can you help to check with service team if there has any updates?
@ArthurMa1978 I have pinged service team again and included you.
@blueww @ArthurMa1978 Anything? :(
@omri-muszkal Actually, the issue is on server side instead of Client (SDK) side. (Both Arthur and me works on client side.) So we will need server team to update server by return the container metadata to fix this issue?
We have contact server team, and a bug is already opened. However, it looks the issue is still not fixed on server side.
To make server team understand the importance and priority of this issue, you might can also try to connect to Server team with your channel, such like open a help request from Azure portal.

Close as this is not client-side issue, please file ticket to ask service team to fix it.