TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Supreeth J
835
721
56.4k
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
https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
https://docs.microsoft.com/en-gb/rest/api/storageservices/authorization-for-the-azure-storage-services?redirectedfrom=MSDN
Regards
Reply
Answers (
1
)
custom app and console app in salesforce
Azure Service Bus