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