Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
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.
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
Yes, your understanding is basically correct.
The following diagram illustrates the end-to-end scenario with two development workflows:
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.
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
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.