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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sjorg
Frequent Visitor

Create level Permission for Embedded Report causes 500 error

I'm embedding a report in an "App owns data" scenario.

 

In the below code, when I set the accessLevel to "View" or "Edit" it works, but "Create" throws a 500 error. 

 
        // Generate Embed Token.
        var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "Edit");
        var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(groupId, reportId, generateTokenRequestParameters);
 

(I am using this sample, with some edits that are irrelevant to this question - as I said View and Edit work just fine)

https://github.com/snobu/powerbi-embed-v2/blob/master/backend-as-func/run.csx

 

I have granted the "Content.Create" permission in the Azure app registration. My hunch is that Create is not a valid "Reports" object permission...I have to embed a "Content" object instead, based on this list

https://docs.microsoft.com/en-us/power-bi/developer/power-bi-permissions

 

How do I do that? My real end goal is to be able to programmatically create a new blank Report via API, and add data sources via Azure Tables to it. Then I want to return that ReportId to my client side & embed it, so the user can play with the data.

 

If you have any hints on that (is that even possible?), would be much appreciated.

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @sjorg,


How do I do that? My real end goal is to be able to programmatically create a new blank Report via API, and add data sources via Azure Tables to it. Then I want to return that ReportId to my client side & embed it, so the user can play with the data.

 

If you have any hints on that (is that even possible?), would be much appreciated.


Yes, you should be abe to create a new blank report via Power BI Rest API, and let the end users play with it.

 

And I just verified that the rest API still works fine for me, when I set the accessLevel to "Create". 

 

If the issue persists on your environment, I would suggest you reopen this issue or create a support ticket on Power BI Support page for better assistance. Smiley Happy

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @sjorg,


How do I do that? My real end goal is to be able to programmatically create a new blank Report via API, and add data sources via Azure Tables to it. Then I want to return that ReportId to my client side & embed it, so the user can play with the data.

 

If you have any hints on that (is that even possible?), would be much appreciated.


Yes, you should be abe to create a new blank report via Power BI Rest API, and let the end users play with it.

 

And I just verified that the rest API still works fine for me, when I set the accessLevel to "Create". 

 

If the issue persists on your environment, I would suggest you reopen this issue or create a support ticket on Power BI Support page for better assistance. Smiley Happy

 

Regards

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.