Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Power bi Refresh API service principle

Trying to build a step into my data pipeline that could refresh the power bi report. I have made it to this far that my AAD Client ID triggers the refresh, but it always asks my personal password, plus the mfa. Is there a way to use a service principale or something that wouldn't require a personal password?

 

 

 

 

 

5 Replies

  • Hi Anonymous ,

     

    Yes you can use the Service principal to call the Refresh API

     

    POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes

    But before you call the refresh API the SPN needs to takeover the dataset, for that you can call the below API

     

    POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/Default.TakeOver

    All the above API needs to call using the SPN credentials.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for getting back to me. How did you do the authentication?