It seems like it is not parsing correctly which could be a problem of azcopy itself https://github.com/Azure/azure-storage-azcopy/issues/122 or the "pipe" itself.
I have tried several different date formats.
&se=2028-01-01
&se=2039-01-01T08:00:00Z
Yet, there is still an error.
AuthenticationErrorDetail: se is mandatory. Cannot be empty.
Using the exact same command and SAS token locally works perfectly.
The PUT URL it creates doesn't have the `se` query parameter though it's the SAS token!
PUT https://xyz.blob.core.windows.net/$web/robots.txt?sig=-REDACTED-&sp=rwdlacu&spr=https&srt=o&ss=b&sv=2017-07-29&timeout=901
@Thomas Beauvais it seems like it is azure issue, because our pipe only copies and if the token is not validated by azure, it is either token or azure problem. Our tokens generated are working properly.
However, haven't you tried to generate sas token via azure portal?
Thanks for the reply.
The trouble is that the azcopy CLI (10.5.0) works with the same token (sorry that I failed to mention that).
The token I am using is in the format of the console. The discrepancy seems like it is in some transform somewhere or a version mismatch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thomas Beauvais try, please, the next command for generating the token
az storage container generate-sas --name <container_name> --account-name <storage_account_name> --expiry ${SAS_TOKEN_EXPIRY} --permissions ${PERMISSIONS} | sed 's/["\t]//g
SAS_TOKEN_EXPIRY=$(date -d "60 minutes" '+%Y-%m-%dT%H:%M:%SZ')
I suspect, removing \t, it worked for me. I think, It is that specific way how azcopy works with token in shell (depending on shell), because sometimes they do not ignore some spaces etc.
Using rest api is more complicated here, but you could try also to use sed for the token in some way after executing PUT.
Looking forward to hearing back.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also you can refer to examples, azure is recommending to use https://docs.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latest#az-storage-container-generate-sas-examples ,
but I think still attention to spaces , \t, \n etc. should be paid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.