3

I have a file in an Azure File storage. I would like to download it using a DSC resource (xRemoteFile, for example).

The Azure File storage gives me an HTTPS url to that file, but it is not directly usable:

enter image description here

EDIT 1

Using SAS:

enter image description here

Next I am trying to use the SAS URL:

enter image description here

Still no dice.

EDIT 2

As you can see from the snapshots, the SasToken is

?sv=2017-07-29&ss=f&srt=o&sp=r&se=2020-05-10T00:41:14Z&st=2018-05-09T16:41:14Z&spr=https&sig=... 

and the URL is

https://***.file.core.windows.net/?sv=2017-07-29&ss=f&srt=o&sp=r&se=2020-05-10T00:41:14Z&st=2018-05-09T16:41:14Z&spr=https&sig=... 

i.e. the SasToken is appended to https://***.file.core.windows.net/

1 Answer 1

3

I can't tell from the screenshot if you are, but you need to specify a SaS token. Azure File shares have the ACL set to private and you cannot change that, so you can't download the file anonymously. You need to generate a SaS token for authentication and then use that in your URL.

You can generate a SaS token directly in the Azure portal now.

5
  • Still does not work. I must be misunderstanding something very basic here... Commented May 9, 2018 at 17:01
  • your URL is wrong, it should be name.files.core.windows.net/filename.doc?SaSToken Commented May 9, 2018 at 17:02
  • Hmm, but this is exactly what I am doing - I updated the post. Commented May 9, 2018 at 20:09
  • No, your not, your doing file.core.windows.net?sastoken, you have no file name inbetween Commented May 9, 2018 at 20:17
  • Oh, stupid me. Now I finally get it. Thanks a bunch, it worked. Commented May 9, 2018 at 20:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.