Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to apply a nested (within a group) bookmark (https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks#bookmark-groups) in the config of the embedded report as in the code below
let config = {
type: 'report',
tokenType: tokenType == '0' ? models.TokenType.Aad : models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
bookmark: { name: "Bookmark531b9be925387024e0a0" }
};
let embedContainer = $('#embedContainer')[0];
report = powerbi.embed(embedContainer, config);
However I get a following error
However when I apply the same bookmark after the page is loaded
await report.bookmarksManager.apply("Bookmark531b9be925387024e0a0");
it works perfectly fine.
There is no issue when I use non-grouped bookmark and I can use it in the config directly so I have a feeling that it is a bug in api.
I would appreciate any hints on how to fix it.
Hi @Anonymous
What kind of embed are you using, app owns data or user owns data?
If you use user owns data, you may refer to this blog: Personal bookmarks
Could this API work to apply the bookmark in Groups?
await report.bookmarksManager.apply("Name");
This code shows how to specify a bookmark by name:
let embedConfig = {
...
bookmark: {
name: "Bookmark4f76333c3ea205286501"
}
};
For reference: On load bookmark
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Rico,
thank you for your message.
I use app owns data scenario, so I use report wide bookmarks.
As I mentioned in my original post, when the bookmark is within a group, I can't set it onload. However I can set it using await report.bookmarksManager.apply("Name"); after the report is loaded.
It is not the case for non-grouped bookmark, where both approaches work.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |