This article will guide you through the implementation of CI/CD pipelines using Azure DevOps. This will enable you to deploy your local report to your Power BI service automatically. To show you how it works, I will use an extension called Power BI Actions, available for free on the Visual Studio marketplace.

Azure Portal

Create a new app registration

To access Power BI service content and APIs, you need to register an application that will authenticate against your Azure Active Directory. To do so, follow these instructions:

Provide a name that describes your application’s purpose, select a supported Account type, and click on Register.

Automate your Power BI reports deployment using Azure DevOps

Once the registration is completed, you will be redirected to the app overview page. Copy the application ID’s value as you will need to specify this later in Azure DevOps.

Automate your Power BI reports deployment using Azure DevOps

Select Certificate & Secrets tab, generate a new client secret, and copy its value.

Automate your Power BI reports deployment using Azure DevOps

You need to give some permission to your app to conclude the configuration of your application.

Power BI

Setting up the tenant

The next step is to configure your Power BI,

Configure a workspace

Now create the workspace where your pipeline will publish the reports and grant permission to your Azure AD App to do this,

Search the app that you have previously registered in Azure AD and grant it the permission of Admin.

Automate your Power BI reports deployment using Azure DevOps

Azure DevOps

Install the extension

These instructions will show you how to install the Power BI Action extension that we are going to use for this tutorial,

As the Marketplace opens, search for Power BI Actions and click on the respective result.

Click on the Get it Free button.

Automate your Power BI reports deployment using Azure DevOps

Select your target organization from the dropdown and click on Install to complete the procedure.

Automate your Power BI reports deployment using Azure DevOps

Create a new service connection

Creating the Build Pipeline

It is time to create your build pipeline.

Create a Release pipeline

To automatically deploy your report on Power BI, create a new release pipeline.

Add the Extract Files task and configure it as follows.

Automate your Power BI reports deployment using Azure DevOps

Finally, add a Power BI Action task, select Upload Power BI Report as Action, enter the target workspace, and add the Source file (path where there will be your report)

Automate your Power BI reports deployment using Azure DevOps

You need to specify the deployable component that will be built through the build pipeline and then released by the release pipeline.

To finalize your release pipeline, instruct the pipeline to automatically create a new release every time a build is available. Apply this feature by enabling the Continuous deployment trigger.

Automate your Power BI reports deployment using Azure DevOps

It is now time to push your local code to your repository and start the pipelines.

References