Forum Discussion
Issue Exporting Power BI Paginated Report via API Using Service Principal
- 5 months ago
Hi v-hjannapu and Ritaf1983
Thank you for the responses
The issue was resolved by doing a direct query to the database
Hi Rohan-Kumar
This error is not caused by the Export API itself. It occurs during rendering of the paginated report, when Power BI tries to execute the query against the Semantic Model / Analysis Services using the service principal identity. That explains why the same export works with a master user and fails with a service principal.
First, make sure the service principal can actually consume the Semantic Model used by the paginated report. Creating a dataset via API does not automatically grant permissions to use it. The service principal must be added to the workspace as at least Member or Contributor, and it must have Build permission on the Semantic Model. Missing Build permission commonly results in Analysis Services connection errors during paginated rendering.
If the Semantic Model uses DirectQuery to Azure Analysis Services or SSAS, the service principal must also be explicitly added to the corresponding model roles in AAS/SSAS. Without permissions at the Analysis Services level, the query will fail at render time even though the REST call itself is valid. The error message you are seeing is typical for this scenario.
Also verify that you are not sending an effective identity unless it is strictly required. Effective identity and SSO are not supported in several paginated export scenarios, especially when the Semantic Model uses DirectQuery to AAS or to another Semantic Model, or when any data source has SSO enabled. In such cases the export may work with a master user but fail with a service principal.
Confirm that the paginated report is hosted in a workspace backed by Premium / Embedded / Fabric capacity, and that the tenant setting “Allow service principals to use Power BI APIs” is enabled and allows this service principal (or its security group).
If all of the above is correctly configured and the issue persists, this is very likely a product limitation or backend issue around paginated report export with service principals. At that point, the correct next step is to open a Microsoft support ticket and include the RootActivityId from the error, the workspace and report IDs, confirmation that the export succeeds with a master user, and details about the Semantic Model connection (Import vs DirectQuery, AAS/SSAS, SSO, RLS).
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly