I am having a requirement to embed powerBI paginated report to .Net application using app owns data (Service Principal) approach. But the issue I am facing is that our paginated reports are having datasource as sql stored procedures and not using powerBI dataset.
So, while querying the report details using powerbi client from my .net application, I am getting the datasetId = null. What can be the approach in this case to embed the powerBI report and generate Embed Token & Embed URL from .Net application?
Thanks in advance.
datasetIdis not required parameter for Embedding Paginated report.Publish your paginated report to Power BI Service:
Refer to Publish paginated reports documentation. You need to connect to data source in Settings -> Manage Connections and Gateways.
Embedding Paginated Report:
We can Embed Paginated report only using service principal approach. Refer to Embed a Paginated Report documentation.
When you embed a paginated report, we use configuration object of type IPaginatedReportLoadConfiguration you require report id, access Token and Embed URL.
Getting Embed Parameters:
Since, we follow service principal authentication, we require client secret, client id, report id and workspace id. To get the Embed Parameter follow the below steps.
AcquireTokenForClient. You can use this and get the access token.