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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
nguyen-tr-ea-89
Frequent Visitor

Power API export image error: “couldn't load the model schema associated with this report”

We are trying to use Power BI API to export our reports as .PNG images.

 

We use a Service Principal as authentication to the API. The Service Principal is able to make API calls fine, but the exported images show the error message “couldn't load the model schema associated with this report. make sure you have a connection to the server, and try again”.

exported images show errorexported images show error

 

 

In Service, we connect the reports to our Azure SQL Managed Instance via on-prem gateway connection with OAuth authentication. Our reports use DirectQuery connection to pull data from our Azure SQL Database. The exported images work properly for Import connection, but there seems to be a problem when using DirectQuery.

 

 

Maybe there's something in Tenant settings that we need enabled?. Any suggestions are appreciated.

 

 

Things we have tried:

  • Service Principal is added to the workspace as "Contributor"
  • Service Principal is added as an user of the gateway connection
  • Service Principal is given db reader permissions to our SQL Database (we tested the connection from SP to SQL Database in Azure Data Factory and it was able to pull data)

 

2 REPLIES 2
VN999
Resolver I
Resolver I


Refresh the dataset in Power BI Service and check for any refresh errors.
Review and verify all data sources connections and queries in Power BI Desktop.
Republish the report to Power BI Service and test the export functionality again.
Check Power BI Service health status for any ongoing issues or maintenance

Thanks for the response! I tried your suggestions and it didn't work.

I do have a few things to ask:
* It seems I can provide an OAuth 2.0 access token for Azure SQL in the body of the API call ExportToFileInGroup. I hyperlinked the doc, please give me your thoughts. I tried providing the access token but the images still show the error. 
* Maybe I need to grant the Service Principal these API permissions: Dashboard.Read.All, Report.Read.All, Dataset.Read.All?
* There's also something called Service principal profiles in Power BI Embedded, is this relevant to resolve the problem?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.