none
Refresh Power BI dataset from Azure Data Factory - How to authorize to use REST API

    Question

  • Hi,

    I want to trigger a Power BI dataset to refresh as final step in my Data Factory Pipeline. I am using the syntax to refresh a dataset in a group: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdatasetingroup.

    I already was able to configure a Web Activity in ADF to trigger the refresh of my dataset with REST API. Nevertheless I first need to run a console app script with the clientID from my Power BI app in AAD to receive the authorization token. I use this token as Authorization header in my HTTP POST call in ADF. The token is only valid for 1 hour, so this is not a sustainable solution.

    Is there a way to authenticate to the Power BI app through ADF without using Azure Batch service to run a custom script?

    Thanks in advance,

    Kind regards,

    Jonas De Troyer


    Tuesday, October 9, 2018 8:58 AM

All replies

  • from documentation, currently web activity does not other authentication method. (https://docs.microsoft.com/en-us/azure/data-factory/control-flow-web-activity#authentication)

    i think one way to try this maybe written code to dynamically create linked service with the new refreshed token?


    MSDN

    Tuesday, October 9, 2018 11:36 AM
  • Hi Jonas,

    Were you able to solve this? If yes, can you kindly share the steps?

    Prateek Raina

    Thursday, November 15, 2018 4:29 AM
  • Did you try creating a Http Triggered Azure function which can authenticate against Azure AD and receives access token for Power BI service and can refresh your report data-set using PowerBI service SDK?

    Next, you would be able to invoke your HTTP triggered Azure function with the help of Web Activity and you will be all set. 

    Hope this helps you.


    Bhushan Gawale | RapidCircle


    • Edited by Bhushan Gawale Thursday, November 15, 2018 6:28 AM formatted
    Thursday, November 15, 2018 6:27 AM