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.
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.
Solved! Go to Solution.
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.
Regards
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.
Regards
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |