Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
pavanmanideep
Helper III
Helper III

Can we deploy Power BI Report to workspace using Azure Pipelines using Service Principal without Pro

Hi,

 

Please suggest if there is any way to deploy Power BI Reports to workspaces in Power BI Service using Service Principalre using Azure Pipeline and without having a Power BI Pro license ? Could you suggest some references?

 

Thank you.

6 REPLIES 6
Sahir_Maharaj
Super User
Super User

Hello @pavanmanideep,

 

To deploy without a Pro license, the target workspace must be backed by Power BI Premium Capacity. The Service Principal should also be assigned the Contributor or Admin role on the workspace.

 

You can use Invoke-RestMethod in PowerShell (or custom scripts) within your pipeline to interact with the Power BI REST API.

 

1. Get an authentication token for the Service Principal

$token = (Invoke-RestMethod -Uri "https://login.microsoftonline.com/{TenantId}/oauth2/v2.0/token" `
    -Method POST `
    -ContentType "application/x-www-form-urlencoded" `
    -Body @{
        grant_type="client_credentials";
        client_id="{Your-Service-Principal-ClientId}";
        client_secret="{Your-Service-Principal-Secret}";
        scope="https://analysis.windows.net/powerbi/api/.default"
    }).access_token

2. Use the Power BI REST API to upload a report

$workspaceId = "{Workspace-ID}"
$filePath = "path-to-your-report.pbix"
$fileContent = [System.IO.File]::ReadAllBytes($filePath)

Invoke-RestMethod -Uri "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/imports" `
    -Method POST `
    -Headers @{Authorization = "Bearer $token"} `
    -ContentType "multipart/form-data" `
    -Body @{
        "datasetDisplayName" = "ReportName";
        "file" = $fileContent
    }

 Hope this helps.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Thank you @Sahir_Maharaj for your reply,  my client has 30 Power BI Pro Licenses. The reports are being developed by Pro users who are having Admin access and deploying from Power BI Desktop to workspace till now.

 

The same should be automated using Azure DevOps Pipeline, in this case, we should create a Service Principal, give delegated access to Power BI API's and assign a Power BI Pro license to Service Principal created.

 

Please suggest if my understanding is correct.

 

Thank you.

 

Cheers,

PMDY

Anonymous
Not applicable

Hi @pavanmanideep 

 

Yes, your understanding is basically correct.

 

The following diagram illustrates the end-to-end scenario with two development workflows:

vzhengdxumsft_0-1733203576992.png

 

Here are some links for your refrence:
How to Automate and Customize Power BI Deployments with CI/CD Pipelines | phData

Azure DevOps build pipeline integration with Power BI Desktop projects - Power BI | Microsoft Learn

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous 

 

Thank you for the explanation, the article giving the detailed approach but it doesnt talk about the licensing.

 

Could you please confirm this works with Pro license because I cant use the second approach you suggested as it gives me below error...please advise if there is a way Microsoft suggests in this scenario.

 

Thank you in advance.

 

pavanmanideep_1-1733321540038.png

 

Anonymous
Not applicable

Hi @pavanmanideep 

 

As far as I know, the Pro license should be sufficient.

It's worth noting that additional charges may apply for using Azure Pipeline.

Refer to this:

Azure DevOps Services Pricing | Microsoft Azure

vzhengdxumsft_0-1733362569640.png

 

Here are some documents that you may need:

Apps & service principals in Microsoft Entra ID - Microsoft identity platform | Microsoft Learn

Active Directory security groups | Microsoft Learn

What is Azure Pipelines? - Azure Pipelines | Microsoft Learn

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much @Anonymous  for your input, one last thing, could you point to any documentation saying Power BI Pro is sufficient for this requirement so that I can share with my client? I agree with Azure DevOps Pipeline licenses.

 

Cheers,

PMDY

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors