2

I have azure web api app with number of web apis of type post/get to get data. these apis are having basic authentication (bearer token)

  1. I want to use 2-3 APIs as a data source in power bi, so that I can use these APIs JSON response as a table.

  2. In Power BI Desttop > Get Data > Web > add API URL with sample GET API method name, will work but then it is asking for authentication.

  3. If I tried to put API Key, then it is saying: A web API key can only be specified when a web API key name is provided.

How to connect web api using authentication in power bi as a data source.

1 Answer 1

1

PowerBI web seems to currently have little or no support for connecting to data via webapi, or web queries generally.

PowerBI Desktop allows you to get data from the web. I have been able to access data from webapis managed by Azure API Management in two different ways:

  1. Use Advanced rather than Basic in the From Web dialog box. Put the webapi query in the url, but add a header with name Ocp-Apim-Subscription-Key and put in as value the value of the api key.
  2. Alternatively, instead of putting the api key in the header, with APIs managed by Azure API management, it seems you can add them to as a parameter to the apiquery, subscription-key=PutYourApiKey here.

However, I have found that although you can publish your data source or report to an online workspace, PowerBI online will give an error ("credentials not recognized" or similar) when you try and refresh the data! So as mentioned above, PowerBI online seems currently (Nov 2020) useless for connecting to WebApi data.

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.