I am trying to set CORS rules on my Azure Blob Storage account by following these instructions.
This is the error I receive after making my request:
400 Authentication information is not given in the correct format. Check the value of Authorization header
Request URL:
PUT https://[MyAccountName].blob.core.windows.net/?restype=service&comp=properties
Request header:
x-ms-version: 2013-08-15
x-ms-date: Tue, 25 Feb 2014 13:02:00 GMT
Authorization: SharedKey
[MyAccountName]: [MyAccountKey]
Content-Length: 329
Host: [MyAccountName].blob.core.windows.net
Request body:
<?xml version="1.0" encoding="utf-8"?>
<StorageServiceProperties>
<Cors>
<CorsRule>
<AllowedOrigins>http://www.example.com</AllowedOrigins>
<AllowedMethods>GET</AllowedMethods>
<ExposedHeaders>x-ms-meta-data*,x-ms-meta*</ExposedHeaders>
<AllowedHeaders>x-ms-meta-target*,x-ms-meta*</AllowedHeaders>
<MaxAgeInSeconds>200</MaxAgeInSeconds>
</CorsRule>
<Cors>
</StorageServiceProperties>
Suggested Answer: You can provide authorization credentials by using Azure Active Directory (AD), or by using a Shared Access Signature (SAS) token. Box 1: Both Azure Active Directory (AD) and Shared Access Signature (SAS) token are supported for Blob storage.
To authenticate a security principal from your Azure Storage application, first configure Azure role-based access control (Azure RBAC) settings for that security principal. Azure Storage defines built-in roles that encompass permissions for containers and queues.
ADLS - Azure Data Lake Storage. WASB - Windows Azure Storage Blob (provides unencrypted access)
Azure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn't adhere to a particular data model or definition, such as text or binary data.
For people reaching this page and wondering why you get this error even though you are using a Shared Access Signature URL, then you most likely are sending YOUR APP token to Azure. Make sure to NOT include the Authorization header in this case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With