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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SergikitoDZ
Frequent Visitor

Why am I getting licensing errors when logging and publishing Datamodels into PowerBI Service?

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 (it is actually a Pro 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 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi  @SergikitoDZ ,

 

According to my research, it seems that there is no way to assign any license to the service principal, which is supposed to be registered for authentication purposes, in which case the solution can only be run using the PBI workspace backed by the Premium capacity, which is supposed to provide the corresponding pro license functionality. The PPU capacity should also be able to provide the functionality of the corresponding pro license.

Power BI service features by license type - Power BI | Microsoft Learn

 

Best Regards,

Liu Yang

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

View solution in original post

Thank you!

 

What I found was that despite what the tutorial says, it is not possible to publish a .bim file to a pro workspace, since it will need an XMLA endpoint, and XMLA endpoints are only available for Premium and PPU workspaces

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @SergikitoDZ ,

 

According to my research, it seems that there is no way to assign any license to the service principal, which is supposed to be registered for authentication purposes, in which case the solution can only be run using the PBI workspace backed by the Premium capacity, which is supposed to provide the corresponding pro license functionality. The PPU capacity should also be able to provide the functionality of the corresponding pro license.

Power BI service features by license type - Power BI | Microsoft Learn

 

Best Regards,

Liu Yang

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

Thank you!

 

What I found was that despite what the tutorial says, it is not possible to publish a .bim file to a pro workspace, since it will need an XMLA endpoint, and XMLA endpoints are only available for Premium and PPU workspaces

Anonymous
Not applicable

Hi  @SergikitoDZ ,

 

As far as I know, if you are using the Premium feature of the PBI workspace, whether you are using the UI click method or the API method, you need to monitor and check if your workspace is Premium capacity. If not, you will encounter a similar error: 'pbi.error': {'code': 'PowerBINotLicensedException'}. So if you currently only have a Pro workspace and aim to automate the deployment of your PBI data model to the workspace in the PBI service while maintaining CI/CD, you may need to see if there is a way to automate it without Premium if needed. Alternatively, you can double-check the documentation to see if PPU's license assignments to a workspace support bypassing the 'PowerBINotLicensedException' error.

 

Best Regards,

Liu Yang

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

Hello @Anonymous , thank you for your answer!

 

I don't understand why the Premium workspace should be needed.  Which one is the Premium feature I am trying to use?

 

I probably wasn't precise enough in my previous post, or there is something that I am still not understanding: in the linked tutorial, it says that the Premium workspace is just needed in case you want to activate and have the PowerBI Deployment Pipeline tool and the multiple environments, which is not the case.

 

In case I wasn't precise enough: what I am trying to do is to deploy a .bim file into a Pro workspace using the API using a Service Principal. From my understanding, there shouldn't be a use of a Premium feature on those steps 🙃.

 

I have also tried calling the API using Powershell in two different ways, but I get the same error:

 

Deploy option 1

PS C:\WINDOWS\system32> D:\Downloads\TabularEditor.Portable\TabularEditor.exe "D:\Downloads\Model.bim" -D "Provider=MSOLAP;Data Source=powerbi://api.powerbi.com/v1.0/myorg/WorkspaceModels;User ID=app:[ClientID]@[TenantID];Password=[SecretID];" "Model Name" -O -C -R -M -E -V

 

Return

Tabular Editor 2.25.0 (build 2.25.8952.22276)
--------------------------------
Loading model...
Deploying...
##vso[task.logissue type=error;]Deployment failed! PowerBI Request Failed.

Action: Generating MWC token

Description: {"error":{"code":"PowerBINotLicensedException","pbi.error":{"code":"PowerBINotLicensedException","parameters":{},"details":[],"exceptionCulprit":1}}}

Technical Details:
RootActivityId: 48e5a1d2-xxxx-xxxx-xxxx-xxxxxxxxxxx
##vso[task.complete result=Failed;]Done.

 

Deploy option 1

PS C:\WINDOWS\system32> Start-Process D:\Downloads\TabularEditor.Portable\TabularEditor.exe -Wait -ArgumentList '"D:\Downloads\Model.bim" -D "Provider=MSOLAP;Data Source=powerbi://api.powerbi.com/v1.0/myorg/WorkspaceModels;User ID=app:[ClientID]@[TenantID];Password=[SecretID];" "Model Name" -O -C -P -V -E'

 

Return

Tabular Editor 2.25.0 (build 2.25.8952.22276)
--------------------------------
Loading model...
Deploying...
##vso[task.logissue type=error;]Deployment failed! PowerBI Request Failed.

Action: Generating MWC token

Description: {"error":{"code":"PowerBINotLicensedException","pbi.error":{"code":"PowerBINotLicensedException","parameters":{},"details":[],"exceptionCulprit":1}}}

Technical Details:
RootActivityId: e87093d1-xxxx-xxxx-xxxx-xxxxxxxxxxx
##vso[task.complete result=Failed;]Done. 

 

Deploy option 3

Based on the following structure ($headers containing the .bim file in Base64 format and the access token)

Invoke-RestMethod -Method Post -ContentType "application/x-www-form-urlencoded" -Headers $headers -Uri "http://api.powerbi.com/v1.0/myorg/groups/4f920461-xxxx-xxxx-xxxx-xxxxxxxxxxxx/models"

 

Return


Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At line:1 char:1
+ Invoke-RestMethod -Method Post -ContentType "application/x-www-form-u ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

 

Kind regards

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Solution Authors