Server failed to authenticate the request for blob storage

Sanjana Sambur 1 Reputation point Microsoft Employee
2022-01-12T02:23:38.96+00:00

Hello,

I am trying to access the blob storage but I get the following error: "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature." I checked my keys which connect the blob and they are enabled with SAS. Then I thought the SAS might have expired so I created a new SAS for the blob and detached and reattached a new connection in the storage with new SAS. Even after that I am getting authentication failure. Can you help me understand if there is other authentication that I am missing?

Thanks!

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,366 Reputation points Microsoft Employee Moderator
    2022-01-12T06:43:02.023+00:00

    Hello @Sanjana Sambur ,
    Can you kindly validate if your storage account is under a firewall. If yes - you will have to allow the existing VNET under the firewall from Azure portal.

    Also , just validate how are you trying to access the container. In general, you cannot directly get a container like:

    https://storageaccountname.blob.core.windows.net/containername?{SAS token}

    Either you can add entire blob path to it or add a "restype=container" to get container

    Try to add a blob path to the URL:

    https://storageaccountname.blob.core.windows.net/containername/{folder}/{blob}?{SAS token}

    Basically , the correct way to get container is:

    generate an account SAS
    append it to the container URL
    append "restype=container" or “restype=container&comp=list”

    If you are trying to access the container using some application , try to use all lowercase characters while accessing : https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#metadata-names

    Sometimes , rotating the keys might help !

    Regards,
    Shiva.


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.