Hello dunia khateeb,
Greetings! Welcome to Microsoft Q&A Platform.
I understand that you’re encountering an authentication issue with Azure Storage services and the error message you are getting "authenticationfailed, server failed to authenticate the request. make sure the value of authorization header is formed correctly including the signature" typically occurs when there is issue in authenticating the user request. This issue happens when the authorization signature is incorrect. Please refer to this doc for details regarding troubleshooting this error/issue- https://techcommunity.microsoft.com/t5/azure-paas-blog/the-mac-signature-found-in-the-http-request-xxxx-is-not-the-same/ba-p/3293726
Also Please consider checking below troubleshooting steps to resolve the issue,
1.Can you kindly validate if your storage account is under a firewall. If yes - you will have to allow the existing VNET under the firewall from Azure portal. Also, just validate how are you trying to access the container. In general, you cannot directly get a container like:
https://storageaccountname.blob.core.windows.net/containername?{SAS token} Either you can add entire blob path to it or add a "restype=container" to get container.
2.Try to add a blob path to the URL: https://storageaccountname.blob.core.windows.net/containername/{folder}/{blob}?{SAS token}.
3.Based on the error message it indicates that the server failed to authenticate the request and that you should check the value of the Authorization header to make sure it is formed correctly, including the signature.
Can you also re-confirm the access keys were not refreshed etc., by confirming they match with the keys in the Portal?
- Are you trying to upload to Files or blob storage?
- Verify System Time (Make sure that the system time on the machine generating the SAS token is accurate. A significant time discrepancy could lead to authentication failures)
- Try to regenerate New SAS token and upload
- For testing purpose can you upload using Storage account key and Storage explorer or azcopy tool?
If you are trying to access the container using some application, try to use all lowercase characters while accessing: https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#metadata-names
4.Refer this doc for file share related auth issues - https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/files/security/files-troubleshoot-smb-authentication?tabs=azure-portal
Similar thread for reference - https://stackoverflow.com/questions/46936817/azure-blob-storage-server-failed-to-authenticate-the-request, https://learn.microsoft.com/en-us/answers/questions/1821066/azure-blob-storage-not-being-able-to-authenticate,
Additional Information :
Reference link : https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#best-practices-when-using-sas: Based on the error message there is similar thread discussion here which gives some idea on your issue.
Hope this answer helps! please let us know if you have any further queries. I’m happy to assist you further.
Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.