Azure storage table Query Entity RRS feed

  • Question

  • Hi Azure experts,

    i was trying to follow the URL: https://msdn.microsoft.com/en-us/library/azure/dd179421.aspx to read the DevStorage Table in my local machine.

    To read table entities using GET method from my machine using POSTMAN google app, i was getting the error.

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
        <message xml:lang="en-US">One of the request inputs is out of range.

    Kindly advise how can i querying entities using the approach from below URL for DevStorage table


    kindly someone help me on this!


    Thanks, SaravanaBharathi.A

    Friday, November 27, 2015 11:12 AM

All replies

  • Hi,

    Thanks for posting here.

    I suggest you to refer the similar thread.


    Hope it helps.

    Girish Prajwal

    Friday, November 27, 2015 7:10 PM
  • So this query obviously has problem:'Account')?$select=PartitionKey,RowKey,empname

    Please note that "=" sign is not supported. It should be "eq". eq 'Account')?$select=PartitionKey,RowKey,empname

    Not sure about the 2nd query. Are you setting all the required headers properly?

    Hope this helps.

    Saturday, November 28, 2015 4:18 PM
  • Hi Gaurav,

    I'm using google POSTMAN app to test the below URL as mentioned by you for GET. eq 'Account')?$select=PartitionKey,RowKey,empname

    Headers are,

    Authorization : SharedKeyLite DevStorage:DevStorage

    x-ms-date : Mon, 30 Nov 2015 15:25:14 GMT

    I was received response in Body as below,

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
        <message xml:lang="en-US">One of the request inputs is out of range.

    I was received Response header as below,

    Content-Length → 343
    Content-Type → application/xml
    Date → Mon, 30 Nov 2015 09:25:05 GMT
    Server → Microsoft-HTTPAPI/2.0
    x-ms-request-id → ae57744a-7d70-4be9-8ee8-0ace5af661ed

    Any help is appreciable.

    similarly i tried using the azure storage account for the same also receiving error!


    Thanks, SaravanaBharathi.A

    Monday, November 30, 2015 9:31 AM
  • Hi Gaurav / azure experts,

    I have copy pasted the code which is helpful and able to get data with help of partition key and row key combination. But i would like to get the data with any of custom column in a record with json response. Help me to get the code for that please if possible since i have tried by replace the query and end up with error.


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    using System.Net;
    using System.IO;
    using System.Security.Cryptography;
    using System.Globalization;

    namespace webapiclient
        class Program

            public enum SharedKeyAuthorizationScheme
                SharedKey, SharedKeyLite

            static string Account = "yourstoragetablename";
            static string TableEndPoint = "https://yourstorageaccountname.table.core.windows.net/";
            static string storageAccountKey = "yourstorageaccountkey";

            public static String CreateAuthorizationHeader(String canonicalizedString)
                String signature = String.Empty;

                using (HMACSHA256 hmacSha256 = new HMACSHA256(Convert.FromBase64String(storageAccountKey)))
                    Byte[] dataToHmac = System.Text.Encoding.UTF8.GetBytes(canonicalizedString);
                    signature = Convert.ToBase64String(hmacSha256.ComputeHash(dataToHmac));

                String authorizationHeader = String.Format(
                    "{0} {1}:{2}",

                return authorizationHeader;

            public static void GetEntity(String tableName, String partitionKey, String rowKey, String name)
                String requestMethod = "GET";

                String urlPath = String.Format("{0}(PartitionKey='{1}',RowKey='{2}')", tableName, partitionKey, rowKey);

                String storageServiceVersion = "2013-08-15";// "2012-02-12";

                String dateInRfc1123Format = DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture);
                String canonicalizedResource = String.Format("/{0}/{1}",
                String stringToSign = String.Format(
                String authorizationHeader = CreateAuthorizationHeader(stringToSign);

                Uri uri = new Uri(TableEndPoint + urlPath);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
                request.Method = requestMethod;
                request.Headers.Add("x-ms-date", dateInRfc1123Format);
                request.Headers.Add("x-ms-version", storageServiceVersion);
                request.Headers.Add("Authorization", authorizationHeader);
                request.Headers.Add("Accept-Charset", "UTF-8");
                request.Accept = "application/atom+xml,application/xml";

                request.Headers.Add("DataServiceVersion", "2.0;NetFx");
                request.Headers.Add("MaxDataServiceVersion", "2.0;NetFx");

                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                    Stream dataStream = response.GetResponseStream();
                    using (StreamReader reader = new StreamReader(dataStream))
                        String responseFromServer = reader.ReadToEnd();

            static void Main(string[] args)
                GetEntity("sampletable", "AAA", "0001", "tester2");

    Thanks, SaravanaBharathi.A

    Wednesday, December 9, 2015 8:07 AM
  • Why don't you use Azure Storage Client Library instead of implementing your own?
    Friday, December 25, 2015 1:37 AM