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
kd_61
Frequent Visitor

Embedding Paginated Report with AppOwnsData and data gateway

I am following the tutorial for embedding a paginated report in my application. I am using the AppOwnsData sample on Github to test, and have supplied all the required settings and am using service principal as recommended. The application displays the error "Value cannot be null. (Parameter 'input')". The sample app crashes on line 52 of PbiEmbedService.cs

datasetIds.Add(Guid.Parse(pbiReport.DatasetId));

It is expecting a datasetId, but the PowerBiClient instance does not supply this parameter value (it does show other property values though like report name and report Id). I am not sure where the application, or I, would go about finding a dataset Id. We are using an on-pemises data gateway for Power BI Online and SQL Server. The reports display just fine in Power BI Online, but because of the data gateway there aren't any embedded datasets from which to obtain an Id. Are there any limitations for AppOwnsData and the on-premises data gateway?

1 ACCEPTED SOLUTION
kd_61
Frequent Visitor

I solved this by downgrading the microsoft.powerbi.api nuget package from version 3.x to version 2.x. You can refer to the github issue thread for more information.

View solution in original post

3 REPLIES 3
kd_61
Frequent Visitor

I solved this by downgrading the microsoft.powerbi.api nuget package from version 3.x to version 2.x. You can refer to the github issue thread for more information.

Anonymous
Not applicable

Hi @kd_61 ,

What data source the paginated report is using? Is it a data set? If the related report was created base on the shared dataset, you can't embed it in the "App Owns Data" scenario... Please find the following documentation for the details.

Limitations and considerations

If it is a normal report, you can refer the below blog to get the dataset id.

How to find a Dataset ID in Power BI

Best Regards

Hi @Anonymous 

I am creating the reports in Power BI Report Builder and using a Miscrosoft SQL Server datasource. When I publish the reports, the datasets from the SQL Server datasource are not getting embedded with the report. Because we have the power bi on-premises gateway installed, I am able to view the published reports in Power BI Online. However, since the datasets from the SQL server datasource do not get embedded during pulish, they do not appear in the datasets section of Power BI online and I cannot get a dataset Id as described in the link you shared.

I understand that there is a limitation for using Power BI shared datasets in AppOwnsData scenarios. Is there also a limitation for using SQL Server datasources with a gateway?

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.