Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hello Power BI Community,
I’m currently facing an issue with automating Paginated report exports in Power BI using the REST API with a service principal. Everything seems to be working fine when I use a master user, but I’m running into issues when trying to use a service principal for the same task.
Here’s a brief overview of what I’ve done so far:
Set up a Service Principal in Azure Active Directory and granted it the necessary API permissions (e.g., Report.Read.All, Dataset.ReadWrite.All, etc.) for Power BI.
Used the OAuth2 client credentials flow to authenticate and obtain an access token for the service principal.
Successfully created a dataset using the Power BI API.
Created paginated reports based on this dataset.
Attempted to use the Export to File in Group API to export the report.
When I try to export the report using the service principal, I’m encountering the following error:
The export works perfectly fine when I use a master user for authentication, so the issue seems to be related to service principal authentication.
Thanks in advance for your help!
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,
Thanks for update, If you face any other issues or need help in future, feel free to post here. We will be happy to help.
Regards,
Community Support Team.
Hi @Rohan-Kumar,
I would also take a moment to thank @Ritaf1983 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Regards,
Community Support Team.
Hi @Rohan-Kumar,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.
Regards,
Community Support Team.
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
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 48 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 118 | |
| 117 | |
| 38 | |
| 36 | |
| 27 |