Azure Shared Access Signature – Signature did not match

Short Answer:

Add comp=list&restype=container to your SAS URL and you should not get this error.

Long Answer:

Essentially from your SAS URL, Azure Storage Service is not able to identify if the resource you’re trying to access is a blob or a container and assumes it’s a blob. Since it assumes the resource type is blob, it makes use of $root blob container for SAS calculation (which you can see from your error message). Since SAS was calculated for mark blob container, you get this Signature Does Not Match error. By specifying restype=container you’re telling storage service to treat the resource as container. comp=list is required as per REST API specification.

Leave a Comment