AzureDevOps: CICD for PowerBI Reports Using PowerShell

This sample script is used to call PowerBI API's using PBI Powershell Modules. I've written a Detailed Article on how you can implement this with Azure DevOps.

5 Star
656 times
Add to favorites
E-mail Twitter Digg Facebook
  • Powershell task order in pipeline
    4 Posts | Last post November 10, 2019
    • Great article in using DevOps to CI-CD a Power BI file. I just want to have clear the order to use the powershell task inside the pipeline. Is it first the Power BI Actions and then the powershell tasks? Or the other way round? Thanks.
    • Hi diegotorrescabezas,
      Thanks for your compliments. I wrote the article by giving you a reference/insights that you can use both PowerBI Actions and Powershell based on your requirements.
      I'd recommend you to use Powershell task for all your requirement since powerbi action doesn't support the Service Principal as of now. In my article I gave you with some example like Take Over DataSet ,update data source credentials ,update parameter API 
      But you can do all the things in the Powershell itself. Hope this answered your question. If not please let me know
    • Thanks, understood. The extension allows me to use only master accounts. If I want to use service principal, powershell is the way to go. I'm already publishing pbix reports using ps task, now I will try to update datasource credentials and refresh the dataset that is inside sql server on premise. Hope that last part is possible with a hosted agent...
    • Hi diegotorrescabezas,
      I assume you are using the gateway for your report, as you told it's an on-premise SQL server. unfortunately, SPN currently doesn't support gateway access. You can update the takeover, update the data source credentials using the Powershell. 
      But after you have to assign the gateway to your dataset manually ☹ After that you can able to refresh your reports.
      I already voted this feature in PowerBI. I'd suggest you also put your vote to this.
  • powershell script power BI url
    2 Posts | Last post August 29, 2019
    • Hi,
      I have seen your article. I have a small doubt on powershell scripts.In second powershell script where you have declared url(Power Bi).
    • Hi @NagaManikanta,
      Can you tell me which PowerShell script you are talking about here?