Refresh Power BI dataset through Azure Data factory

by AnkurAggarwal   Last Updated October 17, 2019 11:26 AM - source

Is there a way to refresh Power BI dataset through Azure Data factory?

I found out that there is one REST API (https://powerbi.microsoft.com/en-us/blog/announcing-data-refresh-apis-in-the-power-bi-service/), which can be used to do this task but I am struggling to authenticate and pass an authorization token for the same.

Please suggest what other alternate options do we have?



Answers 3


Currently Azure Data Factory supports only Basic and Client certificate authentication:

Authentication method used for calling the endpoint. Supported Types are "Basic, or ClientCertificate."

Andrey Nikolov
Andrey Nikolov
April 12, 2019 08:17 AM

I was able to refresh my Power BI dataset from Azure Data Factory using Power BI REST API's (POST/GET), the challenge was to pass an authentication token so that I figured out can be done by capturing "access_token" in a separate activity and then pass it to the POST activity which actually refreshes the dataset.

Here is the flow:

  1. Web Activity to get the token_type and access_token. I had to pass various parameters to pipeline (refer screenshot below).

URL: https://login.microsoftonline.com/common/oauth2/token

enter image description here

  1. Another WEB activity to call POST API to refresh the dataset. In this I have passed the authentication tokens captured in previous Login Web activity (refer screenshot below):

enter image description here

Hope this helps!!

Feel free to reach out in case of any questions.

AnkurAggarwal
AnkurAggarwal
April 24, 2019 00:21 AM

Matter of fact, there is an APP implementing REST API in Azure Logic Apps. You can invoke the logic app from the Azure Data Factory then. There is, however, one caveat. Number of refresh requests in last 24 hours are limited to 8 in the premium account - As mentioned in the REST API documentation here.

This is how it looks like in my Logic App Designer.

This is how it will look like in the Logic App Designer

Hope it helps.

eAlie
eAlie
October 17, 2019 11:25 AM

Related Questions



Continuous running job in Azure

Updated August 11, 2019 07:26 AM