I was recently trying to copy some files from Azure using an SAS token. It was failing with the following error;
The remote server returned an error: (403) Forbidden.
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
When run manually in the command line — it’d work.
Turns out it was purely because it was running with a batch file, the % signs (common in the SAS Signature) don’t play nice with batch files.
Changing the % in the signature to %% escaped them, and let it run normally.
Hoping this saves someone else 1 hour ;)