Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
Following instructions from other posts, I am attempting to export an embedded report into a PDF or PPT file with the current state of the report via the following:
1. When the user chooses to export their report, I get the current state via the Javascript API:
var capturedBookmark = await this.report.bookmarksManager.capture();
2. I verify that I get a state value string, and then when exporting via the powerbi api where state is that state string captured in step 1:
var export = await client.Reports.ExportToFileInGroupAsync(new Guid(workspaceId), new Guid(reportId), new ExportReportRequest()
{
Format = fileFormat,
PowerBIReportConfiguration = new PowerBIReportExportConfiguration()
{
Identities = new List<EffectiveIdentity>() { effectiveIdentity },
DefaultBookmark = new PageBookmark(state: state)
},
});
This however always returns an invalid request error of "Export report was provided with an invalid bookmark".
Is there something I might be missing here?
Solved! Go to Solution.
Hi,
I don't see what is missing, the bookmark state should be some base64 which Power BI tries to decodes. The error probably means something was wrong during decoding. Maybe try to see in the network traces how the state you're sending looks like. If it's not a base64 string then it wasn't captured/passed correctly.
You can also try to apply the bookmark state using the Javascript API and see if it's valid.
Hi,
I don't see what is missing, the bookmark state should be some base64 which Power BI tries to decodes. The error probably means something was wrong during decoding. Maybe try to see in the network traces how the state you're sending looks like. If it's not a base64 string then it wasn't captured/passed correctly.
You can also try to apply the bookmark state using the Javascript API and see if it's valid.
The issue was an outdated powerbi-client package. Upgrading resolved the issue.
Hi, Do you have the steps to enable export to pdf/ ptt for powerbi reports embedded in web application for external users
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
10 | |
4 | |
3 | |
2 | |
2 |