Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Anonymous
Not applicable

Applying nested bookmark in the config of the embedded report

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

dmitritsoy_0-1622806149300.png

 

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.

 

2 REPLIES 2
Anonymous
Not applicable

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. 

Anonymous
Not applicable

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.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.