0

I have a REST API Server configured for Basic authentication. I have configured a Power BI report in PowerBI Desktop to read from this REST API. I've setup the Data Source Setting in Power BI as anonymous and then pass the Basic authentication key through the web contents headers.

enter image description here

This works fine. Then I publish the PowerBI report to My Workspace at PowerBi Service to be able to share this report with other users and schedule the dataset refresh. I've installed the on-prem data gateway in a VM that has both access to PowerBI Service and also access to the REST API. I assume that the credentials should be the same as in the Data Source Settings in PowerBI desktop. Since I use anonymous in PBI desktop then I use the same in the PBI service and use the authentication web contents headers for Basic authentication. However 'm getting the following error:

Failed to update data source credentials: The credentials provided for the Web source are invalid. (Source at https://**********/piwebapi.)

enter image description here

Have you experienced something similar? Thanks!

I tried also configuring Basic at PBI Service, and they are accepted. However when I try to refresh the dataset I get the following error: "Web.Contents with the Content option is only supported when connecting anonymously."

1 Answer 1

2

"POST requests may only be made anonymously."

https://learn.microsoft.com/en-us/powerquery-m/web-contents

And Power BI will not allow you to paste plain-text credentials into your query when refreshing through the service. IE you can't make a BASIC auth call with credentials by writing your own Authentication header.

So the only option to use the Web.Contents connector is to pass the request entirely in the query string or HTTP headers when using a non-Anonymous request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.