Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
7 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |