Azure Storage Services: "Query Blob Contents" (API operation) fails; BlobQuery-feature not enabled

Simon Fischer 1 Reputation point
2020-12-28T10:46:59.223+00:00

Hello all,

I'm trying to figure out the "Query Blob Contents"-operation of the Storage Services API. I'm trying to construct the request in VS Code with "REST Client for VS Code"

51576-image.png

Whenever I execute it I receive a HTTP 400 error (HTTP/1.1 400 A required feature for this operation is not enabled on the account.)

51418-image.png

But I activated the feature via Cloud Shell and it's telling me that the feature is registered.

51558-image.png

I also executed "Register-AzResourceProvider -ProviderNamespace Microsoft.Storage" afterwards (like documentation states)

I tried it on accounts in the regions West Europe, North Europe and on France Central, France South (because another documentation for "Find Blobs" says that this feature has limited regional availability)

Any idea what I'm doing wrong or missing? Thanks in advance for your help!

Cheers
Simon

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,088 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,776 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Simon Fischer 1 Reputation point
    2021-01-02T08:34:41.13+00:00

    Hi @deherman-MSFT
    First of all: I wish you a happy New Year! Thanks for reaching out and sorry for not getting back earlier. For some reason I can't reply to your private message. Whenever I click "submit" the button greys out for a moment but then nothing happens. So I'll answer publicly here.

    I executed "az account set --subscription <subscription id>" first and then "az feature show --namespace Microsoft.Storage --name BlobQuery" on the Cloud Shell and was suprised about the result:

    52747-image.png

    As you can see in the screenshot in the first post the "Get-AzProviderFeature" returned that it was registered. I didn't execute the "az account set --subscription ..." before, but since only one subscription is associated with this account I didn't think it was necessary. So the only real difference to before is that I used the Az-module CmdLets instead of the Azure CLI - is there a difference between the two? Or is it possible that - even though I only have one subscription - that the reason was the missing "az account set --subscription ..."?

    It works now, so the problem is solved (even though I don't really understand why) 😅

    Have a great day and a good start into the new year!


  2. Muneeb Mirza 41 Reputation points
    2021-07-08T15:44:25.09+00:00

    I am trying to use Query Blob Content to query from CSV file. Is it possible to query a CSV file with this API and if it is possible, then what can we use in expression?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.