Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

0

Cannot connect to web resource with API Key Header

Hi There

I am attempting to connect to a CSV file on a web service.

 

The source of the file is: 

 

Csv.Document(Web.Contents("https://XXXXX/public/question/YYYYY.csv", [Headers = [#"Authorization"="", #"x-api-key"="<hidden>"]]),[Delimiter=","])

The file does not need Basic/Windows authentication, as long as the header is sent.

 

 

This works fine on the Deskop, but online (Power BI Premium) I get the following error (and a 400 error). I think it's attempting to connect and authenticate, without the header in the "Scheduled" configuration screen. The header is sent as a HTTP header, unfortunately, so I suspect it's not sent when configuring the data source credentials.

 

Failed to update data source credentials: The credentials provided for the Web source are invalid

 

 

On Power BI Premium, whilst connecting to a gateway

 

Unable to connect: We encountered an error while trying to connect to . Details: "We could not register this data source for any gateway instances within this cluster. Please find more details below about specific errors for each gateway instance.

So it's the same issue.

I cannot get the source to authenticate without the header, and the "Edit Credentials" screen doesn't send the header when testing the connectivity.

 

The Web API credentials don't work, as it doesn't send the API Key and Value as a HTTP header.

Status: Delivered
Comments
v-qiuyu-msft
Community Support

Hi @MBF

 

I don't have such data source to test it on my side currently. For your issue, I would suggest you create a support ticket to let engineers look into the issue on your side. 

 

Support Ticket.gif

 

Best Regards,
Qiuyun Yu 

v-qiuyu-msft
Community Support
Status changed to: Delivered
 
gorkazar
Regular Visitor

Hi @MBF , just wondering if you were able to solve this issue.

I'm having the same exact issue and I don't see a solution in here, so before contacting support I was wondering if you were able to fix it. Thanks.