Forum Discussion
Anonymous
6 years agoNot applicable
API ExportTo method (preview) - "API is not accessible for application" 403 response
We're trying to export a report to PDF format using the new ExportTo API method but are getting a 403 error "API is not accessible for application". Other methods like 'Get Reports In Group' work fin...
- Anonymous6 years ago
Sorted - was using the MyWorkspace version by mistake. Needed to use the "Export To File In Group" version.
Anonymous
6 years agoNot applicable
Sorted - was using the MyWorkspace version by mistake. Needed to use the "Export To File In Group" version.
talderman
5 years agoFrequent Visitor
I have no idea what you mean by "was using the MyWorkspace version by mistake. Needed to use the "Export To File In Group" version". Can you please elablorate so myself and others that are having the issue can understand, please?
EDIT:
I think you meant to use:
https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofileingroup
Rather than using:
https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofile
I was able to get past the 403 error by adding identity like below.
{
"format":"PDF",
"powerBIReportConfiguration":{
"pages":[
{
"pageName":"ReportPageName"
}
]
},
"identities":[
{
"username":"[email protected]",
"datasets":[
"00000000-0000-0000-0000-000000000000"
],
"roles":[
"yourrole"
]
}
]
}