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?
Currently Azure Data Factory supports only
Client certificate authentication:
Authentication method used for calling the endpoint. Supported Types are "Basic, or ClientCertificate."
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:
Hope this helps!!
Feel free to reach out in case of any questions.
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.
Hope it helps.