Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi all,
I have a power BI report embedded in a React application. The emedding solution used is: embed for your organization (user owns data). I need to be able to export the underlying data from a table visual using the embedded reports API, but when I call visual.exportData(models.ExportDataType.Underlying, 100) , I get an error saying Error running visual data query.
I am able to export the summarized data using the API. Also, if I use the react application, go to the visual, click on the three dots -> Export Data, I am able to choose beween data with current layout, summarized data and underlying data and all of them work.
The issue happens only when I try to download the underlying data using the embedded API.
Extra details:
License: PPU
Project type: PBIP with PBIR
Embedded report configuration:
const config: models.IReportEmbedConfiguration = {
type: 'report',
id: [my report ID],
embedUrl: embedUrl,
tokenType: models.TokenType.Aad,
accessToken: token,
settings: {
...
},
eventHooks: {
accessTokenProvider: async () => {
return await acquireAccessToken(powerBiEmbed);
},
},
pageName: [my page],
filters: [],
};
Scope for token acquisition: https://analysis.windows.net/powerbi/api/Report.Read.All
Any help with this will be greatly appreciated.
Thank you!
Solved! Go to Solution.
Hi @cristiana777,
Thanks for reaching MS Fabric community support
Yes, exporting underlying data from a visual using the Power BI JavaScript API is supported in embed-for-your-organization scenarios. However, we’ve observed that the export may fail in some cases — even if the same export works through the UI.
This usually happens due to stricter checks enforced by the API. To ensure successful export of underlying data programmatically, please make sure:
The user has Build permissions on the dataset.
The visual actually supports underlying data export.
No Row-Level Security (RLS) or sensitivity labels block the export.
If you’re using an AAD token, we recommend testing the same flow using an embed token with Tokentype.Embeded and setting up the required effectiveIdentity to ensure the dataset access aligns correctly.
Let us know if you’d like help adjusting the embed configuration to test this.
Thanks,
Prashanth Are
Hi @cristiana777,
As we haven’t heard back from you, we wanted to kindly follow up to check if the issue your facing is resolved? or you still need any help here.
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
Hi @cristiana777,
Thanks for reaching MS Fabric community support.
As we haven’t heard back from you, we wanted to kindly follow up to check if the issue your facing is resolved? or you still need any help here.
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
Hi @cristiana777,
Thanks for reaching MS Fabric community support
Yes, exporting underlying data from a visual using the Power BI JavaScript API is supported in embed-for-your-organization scenarios. However, we’ve observed that the export may fail in some cases — even if the same export works through the UI.
This usually happens due to stricter checks enforced by the API. To ensure successful export of underlying data programmatically, please make sure:
The user has Build permissions on the dataset.
The visual actually supports underlying data export.
No Row-Level Security (RLS) or sensitivity labels block the export.
If you’re using an AAD token, we recommend testing the same flow using an embed token with Tokentype.Embeded and setting up the required effectiveIdentity to ensure the dataset access aligns correctly.
Let us know if you’d like help adjusting the embed configuration to test this.
Thanks,
Prashanth Are
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
6 | |
6 | |
2 | |
2 |
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
3 |