Showing results for 
Search instead for 
Did you mean: 

Web API data source refresh issue

Hi Team,


I have created a web api which validates the http header and gives the response in Json format. I have added this api as a data source for a report in power bi desktop which is working fine. But when i publish the report to it fails the data refresh with an exception "Invalid Credentials" and the configured header value is not available in the data connection. need help in fixing this issue




Status: New
Helper III



I think this is still the best workaround when base URL is not anonymous. Works like a charm.

1)Create Azure Function.


This is like a proxy API  and it is anonymous so cloud refresh will not get any credential errors.

Function content is different, depending on what u want to do. This is for solving basic auth problem in my case.


2) Here is an example, how i use this function in powerbi desktop.




I hope this solves your problems also.



Frequent Visitor

Hello everyone,

I solved this problem with this procedure

In my case, the data source of my report in Power BI Desktop work fine when I updating it. But when I published the report at the data update failed with the message: "Invalid credentials".

The procedure:

1. Install the on premises gateway
2. When configuring the source, use "Anonymous credentials" AND mark "Skip test connection"
3. Be happy 🙂

Helper I

I'm having this issue too, insane that pbi doesn't allow a basic header auth to be automated. data gateways are not a reasonable solution for this issue.