Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
cristiana777
New Member

Export underlaying data from visual using the Power BI embedded API

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!

1 ACCEPTED SOLUTION
v-prasare
Community Support
Community Support

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

View solution in original post

4 REPLIES 4
v-prasare
Community Support
Community Support

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

v-prasare
Community Support
Community Support

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

v-prasare
Community Support
Community Support

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

v-prasare
Community Support
Community Support

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.