Forum Discussion

powerbi_jenhen's avatar
powerbi_jenhen
Resolver II
4 years ago
Solved

Export-PowerBIReport Forbidden with Service Principle

Hi,

 

I'm attempting to use "Export-PowerBIReport" with service principle authentication to export a .pbix file to a local drive. I keep receiving the "Forbidden" error. Is this not possible with a service principle? I have also attempted to run this via powershell within a devops pipeline using an on-premise agent but again the same error is received. I can run Get-PowerBIReport with no issues via the service principle and I can use a domain account with PBI and local drive permissions to export the .pbix but how can I do this with a service principle? Ultimately I want to run this within a devops pipeline for archiving automation purposes.

 

Any help appreciated.

 

Thanks. 

  • I figured this out. Along with the admin portal/developer setting api permissions for service principals, they also need to be granted the permissions to download .pbix files:

     

     

4 Replies