Forum Discussion
Unable to export Paginated report to PDF
- 4 years ago
Hi keegan ,
_apiUrl = new Uri("https://api.powerbi.com/");
I think that either the report ID you're using doesn't exist, or the user/service principal which is used when calling the API doesn't have access to the workspace of the report.
You should add the user/service principal as a member to the workspace.
Hi AmosHersch ,
Thanks so much for your assistance I really appreciate it. Sorry I have no idea what I'm doing, so I've taken a while to try more things out and try and grasp what is happenning.
I've updated my authority url and still have the same problems. You mentioned above;
If you still can't get it to work please see in the error response you get has request ID in the header
When I set _apiUrl = new Uri("https://api.powerbi.com/");
I get the following error:
{"error":{"code":"PowerBIEntityNotFound","pbi.error":{"code":"PowerBIEntityNotFound","parameters":{},"details":[],"exceptionCulprit":1}}}
request id = 'a1efd032-385d-4c02-99aa-0522a15a410e'
If I set set _apiUrl = new Uri("https://app.powerbi.com/groups/<groupId>/reports/<reportId>/ExportTo");
//note this was from a sample online??? no idea if its correct...
error response is empty....The process hangs for about 10 seconds and returns internal server error.
Am I correct in assuming my app has authenticated ok in AzureAd via the client-id, client-secret and app id? authenticationResult is populated with a jwt token and expiration date. I assume this came from azuread authentication process.
The process falls over when i try to then export the report via power BI api.
I'm so confused 😂
Hi keegan ,
_apiUrl = new Uri("https://api.powerbi.com/");
I think that either the report ID you're using doesn't exist, or the user/service principal which is used when calling the API doesn't have access to the workspace of the report.
You should add the user/service principal as a member to the workspace.