PowerBI Embedded API ExportToFileInGroupAsync - BAD Request when using Bookmark state

Fabio Franchi 21 Reputation points
2022-10-22T13:21:27.267+00:00

Hi all,

I have a code that run smoothly to export a PowerBI report in a file (e.g. PDF) from a Gen v2 PowerBI embedded.
The trouble is when I try to use a state (the running state of the report, e.g. the selection operates by the user by filters) obtained in the front end by the couple bookmarksManager.capture and capturedBookmark.state.

Notice that capturedBookmark.state really contains a string that resemble a serialized "something".
But when I use that string to create a bookmark object to pass to ExportToFileInGroupAsync (c# API) I receive a 400 Bad Request.

Without passing the Bookmark (passing a null) everything works but I obtain the default report aspect (the one I saved when I published the report to the service).

Has someone a piece a code to share to help me to find the error or faced similar troubles?

Thanks a lot

Fabio

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
32,674 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Fabio Franchi 21 Reputation points
    2022-10-23T10:04:33.987+00:00

    Thank you Patrick.

    Just moved.