Forum Discussion

Pker_Tank's avatar
Pker_Tank
Regular Visitor
1 year ago
Solved

Deploy Power BI reports from Azure DevOps

Hello,

 

I would like to use Azure DevOps with Power BI automation tools to create Deployment pipeline/Assign a workspace to the deployment pipeline/Give user access to the pipeline/workspace etc.. in Power BI service

 

I want to Azure Service Priciple as a service connection in Azure DevOps.

 

Please explain me all the API permissions needed for the Service Priciple and the process to setup in DevOps and Power BI Service.

 

Thanks Heaps

2 Replies

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Community Support

    Hi Pker_Tank ,
    Thanks for posting in Microsoft Fabric Community.

    To automate Power BI Deployment Pipelines using Azure DevOps and a Service Principal, please follow these steps:
    1. Ensure the Service Principal has the following Power BI API permissions in Microsoft Entra ID (Azure AD):
              -Workspace.ReadWrite.All – Manage all workspaces.
              -Pipeline.ReadWrite.All
     – Manage deployment pipelines.
              -Tenant.Read.All – Read tenant settings.
              -Dataset.ReadWrite.All – Manage datasets.

    After adding these, an admin must grant consent in Azure AD.
    2. Enable Service Principal Access in Power BI

    1. In the Power BI Admin Portal, go to Tenant Settings.
    2. Enable "Allow service principals to use Power BI APIs" and specify the allowed security group.
      Please follow the below link for details:
      Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Learn

    3. Set Up Azure DevOps Service Connection

    1. Go to Azure DevOps -> Project Settings -> Service Connections.
    2. Create a new Azure Resource Manager connection using Service Principal (Manual) authentication.
    3. Enter the Tenant ID, Client ID, and Client Secret from the registered app in Microsoft Entra ID.
      Please follow the below link for details:
      Use an Azure Resource Manager service connection - Azure Pipelines | Microsoft Learn

    4. Automate Deployment Pipelines Using Power BI REST APIs

    Use Power BI REST APIs in your DevOps pipeline to:

    1. Create a Deployment Pipeline
    2. Assign a Workspace to the Pipeline
    3. Deploy and Promote Content
    4. Manage User Access
      Please follow the below link for details:
      Automate deployment pipelines with APIs for Power BI items - Microsoft Fabric | Microsoft Learn
      Use service principals & managed identities - Azure DevOps | Microsoft Learn

    Hope this helps. Please reach out for further assistance.

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.

    Best Regards,
    Vinay.

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Community Support

    Hi Pker_Tank ,
    Just following up to check if the provided response has addressed your needs. If it does, please mark it as 'Accepted solution' to assist others with similar queries. If you need further assistance, please reach out.
    Thank you.