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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
aaldo_666
Helper I
Helper I

Download PBIX file using service principal

Hi, 

I set up service principal and I can use it to list specific report, but Im not able to download that PBIX file.

The error I get is Export-PowerBIReport : Operation returned an invalid status code 'Forbidden'

Now I dont know if Im missing priviledges or if service principal can be used for that.

Is it possible to use service principal to download PBIX file from services? 

PS:
I cannot use service principal to download PBIX, how can I download automatically PBIX from services where is 2FA authorization implemented. 

Thanks.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @aaldo_666 ,

 

Do you use the Reset API or click the download pbix option on the service?

Based on the error message, it appears to be an error caused by insufficient permissions. Please check the restrictions on downloading PBIX files according to the following documents.

Export Power BI embedded analytics reports API - Power BI | Microsoft Learn

Download a report from the Power BI service to Power BI Desktop - Power BI | Microsoft Learn

 

Also, pay attention to report with a sensitivity label can't be exported to a .pdf or a .pptx using a service principal.

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @aaldo_666 ,

 

Do you use the Reset API or click the download pbix option on the service?

Based on the error message, it appears to be an error caused by insufficient permissions. Please check the restrictions on downloading PBIX files according to the following documents.

Export Power BI embedded analytics reports API - Power BI | Microsoft Learn

Download a report from the Power BI service to Power BI Desktop - Power BI | Microsoft Learn

 

Also, pay attention to report with a sensitivity label can't be exported to a .pdf or a .pptx using a service principal.

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Thank for response. I forgot to put some details. I have Premium per user license and I want to download PBIX file in format of .pbix using powershell Export-PowerBIReport commandlet.
As I read in the link you sent  

  • Exporting a Power BI report to file using the exportToFile API, isn't supported for Premium Per User (PPU).

So I have to wait for premium per capacity license.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors