Forum Discussion
Importing .pbix files using Rest API and Microsoft.PowerBI.Api package fails with no error details
- 1 year ago
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 ,
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!