I'm trying to get a list of the file names in a directory (&path) from azure. The following code works well in an interactive SAS session but encountering a "400 Bad Request" error in batch mode. In the output.xml file, I get this message: <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication information is not given in the correct format. Check the value of Authorization header. Why the azure_token is not working in the batch mode? Can someone please give some possible solutions? Here is the code: filename json_in temp; data _null_; file in; run; filename resp "X:\output.xml"; proc http method="GET" url= "&pathx.?restype=directory&include=timestamps&comp=list" in=in out=resp; headers "x-ms-file-extended-info" = "true" "x-ms-version" = "2022-11-02" "x-ms-file-request-intent" = "backup" "Authorization" = "Bearer &azure_token."; run;
... View more