none
Azure list blob operation is failing with error 403 “AuthenticationError”

    Question

  • We are working on product which uses Azure storage service for storing data.

    We are using Azure REST API through C++ to communicate with Azure. We are using cURL to execute REST request.

    Right now, we are working on functionality to list blobs, but its failing with error

    <?xml version="1.0" encoding="utf-8"?>
    <Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate
     the request. Make sure the value of Authorization header is formed correctly including the signature.
    RequestId:16cd7e3d-0001-0032-2dd6-6f2e4f000000
    Time:2016-02-25T14:14:23.2377982Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request 'CyPhz
    sBdBCRRg2w157IYY4sIB23XwzKsfdAaUTVCAts=' is not the same as any computed signature. Server used following string to sign
    : 'GET
    
    
    
    
    
    
    
    
    
    
    
    x-ms-date:Thu, 25 Feb 2016 14:16:20 GMT
    x-ms-version:2015-02-21
    /sevenstars/container2
    comp:list
    delimiter:/
    maxresults:2
    restype:container'
    </AuthenticationErrorDetail></Error>

    ====================== Following is the wireshark output that we observed

    GET /container2?comp=list&delimiter=/&maxresults=2&restype=container HTTP/1.1
    Host: sevenstars.blob.core.windows.net
    Accept: */*
    x-ms-date:Thu, 25 Feb 2016 14:16:20 GMT
    x-ms-version:2015-02-21
    Authorization:SharedKey sevenstars:CyPhzsBdBCRRg2w157IYY4sIB23XwzKsfdAaUTVCAts=
    
    HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
    Content-Length: 704
    Content-Type: application/xml
    Server: Microsoft-HTTPAPI/2.0
    x-ms-request-id: 16cd7e3d-0001-0032-2dd6-6f2e4f000000
    Date: Thu, 25 Feb 2016 14:14:22 GMT
    
    ...<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
    RequestId:16cd7e3d-0001-0032-2dd6-6f2e4f000000
    Time:2016-02-25T14:14:23.2377982Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request 'CyPhzsBdBCRRg2w157IYY4sIB23XwzKsfdAaUTVCAts=' is not the same as any computed signature. Server used following string to sign: 'GET

    ======================

    As per suggestions on Microsoft forum. I ensured all parameters are set correctly. (: is used instead of = in string to sign)

    Can you please let us know that how can we resolve this issue? Your help is much appreciated.

    Thanks and regards

    Rahul Naik


    Rahul Naik

    Thursday, February 25, 2016 2:43 PM

All replies