none
Web.Contents with No Authorization header RRS feed

  • Question

  • Hi Everyone.

    I'm creating a custom connector for Power BI using Power Query/M Language on Visual Studio. In the final step of my connector, it will use Web.Contents() to retrieve a presigned file in Amazon S3.

    Since it's a presigned file, my request CAN NOT have a Authorization Header, otherwise it will return an error. The problem is that I'm not able to make the following call without Authorization header:

    results = Web.Contents(file_download_url)

    I know that the function Web.Contents() have a Authorization parameter, so I could use something like:

    results = Web.Contents(file_download_url, [Headers = [Authorization = "ANYTHING HERE"]])

    However, I can't pass an empty Authorization parameter. If I use the default value, it will send a Basic Authorization, which will not work, due the presigned file won't return with an Authorization header.

    One interesting thing to notice is that, if I copy the file URL and paste into Power BI, it works, because Power BI don't send Authorization header on the request (I've double checked it using Fiddler).

    Does anybody know how to send a request without Authorization header?

    Wednesday, April 1, 2020 10:29 PM

Answers

  • Hi Paulo,

    I'd suggest to check the discussions over here: https://github.com/microsoft/DataConnectors/issues?q=is:issue+

    and post your question there if no answer can be found.


    Imke Feldmann - MVP Data Platform (PowerBI) - http://www.TheBIccountant.com 

    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful - Thanks!

    Friday, April 10, 2020 3:07 PM
    Moderator

All replies

  • Hi Paulo,

    I'd suggest to check the discussions over here: https://github.com/microsoft/DataConnectors/issues?q=is:issue+

    and post your question there if no answer can be found.


    Imke Feldmann - MVP Data Platform (PowerBI) - http://www.TheBIccountant.com 

    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful - Thanks!

    Friday, April 10, 2020 3:07 PM
    Moderator
  • Hi Paulo. The fact that Power BI doesn't send an Authorization header but VS does makes me wonder if it's due to a difference in the creds you have configured for the data source in each environment. But, as Imke said, since this is a custom connector, your best bet would be to post your question on github.

    Ehren

    Wednesday, April 15, 2020 8:50 PM
    Owner