I have the sas token with write permission but when I am trying to write the blob getting the below error.
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:6c52482f-c01e-001c-5891-b2f06f000000 Time:2020-11-04T10:03:01.6761446Z Status: 403 (Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.) ErrorCode: AuthenticationFailed
Headers: x-ms-request-id: 6c52482f-c01e-001c-5891-b2f06f000000 x-ms-error-code: AuthenticationFailed Date: Wed, 04 Nov 2020 10:03:00 GMT Server: Microsoft-HTTPAPI/2.0 Content-Length: 529 Content-Type: application/xml
Code:
var blobClient = new BlobClient(new Uri(command.AzureBlobContainerTargetUri.AbsoluteUri));
using (var ms = new MemoryStream())
{
LoadStreamWithJson(ms, JsonConvert.SerializeObject(userData));
await blobClient.UploadAsync(ms);
}
command.AzureBlobContainerTargetUri.AbsoluteUri --> sas token uri userData- some object