Supreeth J

Supreeth J

  • 1.4k
  • 525
  • 32.7k

MS Azure shared key by Azure REST API

Jun 26 2019 8:32 AM
we are trying to access the blobs from azure blob storage without using the Azure SDK,
we are trying to access through the shared key by Azure REST API, for that we need to generate the Authorization header, but when I try to create a signature from the Access key I am getting the following error
"Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature."
"The MAC signature found in the HTTP request 'key hash' is not the same as any computed signature. Server used following string to sign: 'GET'"
string signWithAccountKey(string stringToSign, string accountKey)
var hmacsha = new System.Security.Cryptography.HMACSHA256();
hmacsha.Key = Convert.FromBase64String(accountKey);
var signature = hmacsha.ComputeHash(Encoding.UTF8.GetBytes(stringToSign));
return Convert.ToBase64String(signature);
need help to generate proper authorization header, we have followed the documentation

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (1)