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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BrentMorgan
Regular Visitor

Power BI Embedded with Service Principal Throws PowerBINotLicensedException

We are working on setting up Power BI Embedded reports in a .net core web application. Following the examples provided by the online documentation, we were successful in setting up the Paginated Power BI (.rdl files) reports using a Service Principal.

 

However, when attempting to load Power BI Analytic (.pbix) reports we receive a 401 error on a call to https://wabi-us-east2-redirect.analysis.windows.net/explore/reports/..../modelsAndExploration?prefer... url. Further investigation using Fiddler we were able to find the response from the site which included the message PowerBINotLicensedException.

 

We have Power BI Pro/Premium users and have setup the Workspace as Premium as well. 

 

Any help on why a Paginated report works and an Analytic one does not? Also, does anyone have thoughts on how to get passed the licensed exception when using a Service Principal?

 

Thanks -Brent Morgan

 

 

1 ACCEPTED SOLUTION

Thanks I had reviewed those articles prior to posing this question. 

 

I was eventually able to get both Paginated and Analytics reports to work, although I split the mechanism for authentication. Paginated will use Service Principal and Analytics will use the MasterUser option. Not ideal, but it at least works.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @BrentMorgan ,

 

You could refer to these:

https://community.powerbi.com/t5/Developer/Power-Bi-REST-API-401-Authorization-error-when-using-app-... 

https://powerbi.microsoft.com/en-us/blog/use-power-bi-api-with-service-principal-preview/ 

 

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

 

Thanks I had reviewed those articles prior to posing this question. 

 

I was eventually able to get both Paginated and Analytics reports to work, although I split the mechanism for authentication. Paginated will use Service Principal and Analytics will use the MasterUser option. Not ideal, but it at least works.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.