Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Okay here we go. I hope this will help others trying who are trying to use Power BI Embedded (A skus) with Service Principal authentication to Embed for your Customers. Here are the steps I took to get to my problem, but the problem is in bold at the bottom if you want to skip ahead. If anyone can help me I will buy them a coffee. Seriously.
I have been struggling to get Power BI Embedded set up, starting with an A1 sku. My setup is to embed for customers using a service principal. The main resource I am using for the initial setup is https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-co....
I have finished every step at the link above using a service principal. After downloading the sample project in step 8, I am able to run the .NET core app with my service principal and see the sample report in my Power BI workspace. I also modified the sample report to make sure it is working correctly. That is rad, but displayed above the report is the "This is a free trial version, to remove this label a capacity must be purchased." No problem, let's check docs for the next step, Moving to Production.
Okay I need to assign my workspace to a capacity. Since I am using a Service Principal I need to use the Power BI Rest API, specifically this endpoint AssignToCapacity. For that I need my WorkspaceId and CapacityId. I found the WorkspaceId by opening app.powerbi.com to my workspace, and checking the URL for the guid. Alternatively I could have used the Groups API. Unfortunately that API link does not mention the authentication needed. To authenticate to that API you need to pass a Bearer token in the header. To get the token, make a GET request to https://login.microsoftonline.com/{{your_tenantId_here}}/oauth2/v2.0/token/. For the content type use "application/x-www-form-urlencoded". In the body make sure to pass:
Now I am running into a permission error with the Capacity API call. "The client '{guid}' with object id '{guid}' does not have authorization to perform action 'Microsoft.PowerBIDedicated/capacities/read' over scope '/subscriptions/{guid}/resourceGroups/{resourceName}/providers/Microsoft.PowerBIDedicated/capacities/{capacityName}' or the scope is invalid. If access was recently granted, please refresh your credentials." Now to figure out how to set the required permission...
Hi @Log4TurtleShell ,
I suggest you can open a support ticket to get more help, it's free.
https://powerbi.microsoft.com/en-us/support/
Best Regards
Community Support Team _ chenwu zhu
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |