I am trying to find how to automatically deploy PBI Datamodels to a Workspace in PBI Service while maintaining CI/CD. I found this three pages tutorial and I have tried to replicate it https://microsoft-bitools.blogspot.com/2023/01/deploy-power-bi-dataset-via-devops-setup.html
I do not have a Premium Workspace so I have tried to adapt the solution in order to avoid working with the PBI Deployment Pipelines, and also to avoid using more than one environment since it’s not needed.
When running the pipeline, I get an error related to the PBI licensing on the step where it takes the .bim file and tries to deploy it to the PBI Service Workspace (Third post, DeployPBIModelDev.yml section, forth bit of code [# 4 Publish data models], line 26):
Publishing model [Model Farmacia 2800332 copy pipeline] in [aiPharma
Models]Tabular Editor 2.25.0 (build 2.25.8952.22276)
——————————– Loading model… Deploying…##[error]Deployment failed! PowerBI Request Failed.
Action: Generating MWC token
Description:
{“error”:{“code”:”PowerBINotLicensedException”,”pbi.error”:{“code”:”PowerBINotLicensedException”,”parameters”:{},”details”:[],”exceptionCulprit”:1}}}
But as far as I understand, it is not possible to assign a PBI (Pro) License to a Service Principal.
What could be missing?
2
Note that: It is not possible to assign license to Service principal and Service principals are not supported in Power BI Premium Per User (PPU) workspaces. Refer this MsDoc
- Service principals cannot be used for publishing datasets to PPU workspaces. If the workspace you are deploying to is in PPU mode, it will not allow a service principal to interact with it, hence the error “PowerBINotLicensedException”
- Power BI Pro Mode supports service principals, but PPU does not.
Hence to resolve the error, check the below:
- Upgrade the Workspace to Power BI Premium.
- If you want Service Principal authentication only, then make sure that the workspace is in a Premium capacity.
- Use a Power BI Pro User Account for Authentication and Assign a Power BI Pro License to a User in Your Organization.
Select your workspace -> Workspace settings -> Switch to Pro
Reference:
Solved: Re: PowerBINotLicensedException – Service Principa… – Microsoft Fabric Community by v-yiruan-msft.
3