March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I currently have a PBIX report that has an embedded paginated report within it, and I am using the Microsoft.PowerBI.Api library with C# to obtain an embed token and embed the PBIX in my web application.
I already have the code to generate the token, and it works correctly as long as I specify both the PBIX report ID and the paginated report ID.
var embedToken = await powerbiclient.EmbedToken.GenerateTokenAsync(new GenerateTokenRequestV2()
{
Datasets = [ new GenerateTokenRequestV2Dataset("my-guid-here-dataset-1") ],
Reports = [
new GenerateTokenRequestV2Report(Guid.Parse("my-guid-here-report-1")),
new GenerateTokenRequestV2Report(Guid.Parse("my-guid-here-report-1"))
],
TargetWorkspaces = [ new GenerateTokenRequestV2TargetWorkspace(Guid.Parse("my-guid-here-workspace-1"))]
}).ConfigureAwait(false);
Here’s my question:
Is there a dynamic way, through a function or method, to obtain the report ID of the paginated report embedded within the PBIX?
I know there are methods to retrieve the dataset, report, and pages, but I can’t seem to find any method/function/property to get the paginated report ID.
Could someone help clarify this?
Thanks for the reply from lbendlin , please allow me to provide another insight:
Hi, @osb1
Could you please let us know if lbendlin's response resolved your issue? If it did, kindly accept it as the solution.
Of course, if you have your own solution, feel free to share it. This will help other community members with similar issues find a resolution more quickly.
Firstly, to address any confusion you might have, Benzerlin recommends obtaining the report ID within the playground environment.
Here are the relevant links, which I hope you find helpful:
Power BI Playground
Secondly, if we know the location of the workspace where the embedded paginated report resides, we can directly use the API to retrieve the report ID:
The first is the response from the paginated report API:
Items - List Paginated Reports - REST API (PaginatedReport) | Microsoft Learn
The second is the result from the standard report API:
Items - List Reports - REST API (Report) | Microsoft Learn
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello
I think the playground is not too much helpful in this case since it only contains samples in javascript code and as I mentioned above I am using C# implementation with Microsoft.PowerBI.Api library, so bascially what I am trying to achieve is to get the paginated report id before to get the embed token so that I can get the embed token using both reports ids.
In my implementation for now I only have the metada data of the pbix report like workspace and report id, but now there is a requirement to embed a pbix with a paginated report within pbix.
So I am exploring a way using Microsoft.PowerBI.Api and the same pbix information to see if I can grab the paginated report id embedded in the pbix report.
Thank you for your support.
Consider using the embedded playground to see how they code the enumeration of visuals. Pretty sure the report ID is in there somewhere.
Hello
I think the playground is not too much helpful in this case since it only contains samples in javascript code and as I mentioned above I am using C# implementation with Microsoft.PowerBI.Api library, so bascially what I am trying to achieve is to get the paginated report id before to get the embed token so that I can get the embed token using both reports ids.
The process will be the same. Enumerate the visuals, identify the rdl visual, grab its ID.
Hello
I don't see a way to get visual information using c# Microsoft.PowerBI.Api.
Reports - Get Pages - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Hi, @osb1
Has the problem been solved? If it does, share your solution and accept it as a solution that will help other community members who have the same problem as you.
Additionally, we have not yet found any other direct methods to retrieve the ID of the paginated report embedded in Power BI. Therefore, I would suggest the previous approach: if we know the location of the workspace where the embedded paginated report is situated, we can directly use the API to obtain the report ID.
Items - List Paginated Reports - REST API (PaginatedReport) | Microsoft Learn
Furthermore, we have identified an application that can only retrieve the ID of the visual objects. I hope this proves helpful to you:
Power BI Reporting Best Practices Analyzer - Microsoft Fabric Community
To obtain the embed token, you can use the following URL:
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your quick response,
As and update, I haven't found a way to get the report id using powerbi library and since this app is external Items - List Paginated Reports - REST API (PaginatedReport) | Microsoft Learn it is not helpful to solve the approach.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
8 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
6 | |
3 | |
2 | |
2 | |
2 |