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
NazarStasiuk
New Member

Importing .pbix files using Rest API and Microsoft.PowerBI.Api package fails with no error details

Hello team

We've started facing an issue with PowerBI API as of lately (spotted on May 23rd). We are using method PostImportWithFileInGroup to upload a .pbix file to our workspace and afterwards we are utilizing GetImportInGroup method to get details of the import. The latter one returns ImportState as failed, but we are lacking a capability to  get details of what is causing the issue.

Uploading the same file into the same workspace through web UI works just fine.

Is there any way to get details of the import failed through APIs?
Or how should we tackle the issue?

1 ACCEPTED SOLUTION
NazarStasiuk
New Member

Thank you, @v-aatheeque 
We've managed to figure out the issue.

This was rather interesting case. Applying to the API using SDK package (the one mentioned in the title, Microsoft.PowerBI.Api) returned just import state failed, no error details in that response.
But we've called the same api through 'REST API Try It' tool. There was a difference in account used - it was not service principal, but personal admin account and that one did produce a result with error details including error code: DMTS_PowerBIDataMovementUserDatasourceExceededLimit 

It appeared to be and issue with reaching maximum allowed number of datasources (we'e hit 1000). As soon as we removed some reports and datasources subsequently, api returned to normal operation.

View solution in original post

3 REPLIES 3
NazarStasiuk
New Member

Thank you, @v-aatheeque 
We've managed to figure out the issue.

This was rather interesting case. Applying to the API using SDK package (the one mentioned in the title, Microsoft.PowerBI.Api) returned just import state failed, no error details in that response.
But we've called the same api through 'REST API Try It' tool. There was a difference in account used - it was not service principal, but personal admin account and that one did produce a result with error details including error code: DMTS_PowerBIDataMovementUserDatasourceExceededLimit 

It appeared to be and issue with reaching maximum allowed number of datasources (we'e hit 1000). As soon as we removed some reports and datasources subsequently, api returned to normal operation.

Hi @NazarStasiuk ,

Thank you so much for the update ,we’re glad to hear the issue has been resolved on your end! We really appreciate your time and effort in closing the loop.

 

If any of the replies in this thread helped along the way, please consider marking the most relevant one as the accepted solution. This helps others in the community who may face similar challenges to find answers more efficiently.Also, feel free to share your own solution in the thread it would be valuable for others who might benefit from your experience.

 

Thank you again for your kind cooperation and contribution to the community!

v-aatheeque
Community Support
Community Support

Hi @NazarStasiuk ,
Thanks for reaching out to Microsoft Fabric Community Forum.

The issue you're encountering with the Power BI API, where the PostImportWithFileInGroup method results in an ImportState of "Failed" when using the GetImportInGroup method,To tackle the issue systematically:

  • Ensure that the .pbix file you are trying to upload meets the size and format requirements specified by Power BI.
  • Sometimes, there are limitations or restrictions on the API that may not be present when using the web UI. Review the Power BI API documentation to ensure that you are not hitting any limits or restrictions.
  • Test with a minimal .pbix file (e.g., a simple report with one table) to rule out file-specific issues.Try uploading to a different workspace to check if the issue is workspace-specific.
  • The API may fail due to insufficient permissions for the service principal or user account,Common permission-related.

If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

If you continue to face issues, feel free to reach out to us for further assistance!

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.