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

Don'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.

Reply
Suryakant_99
Frequent Visitor

Getting this "exploration 401 (Unauthorized)" error while applying bookmark.

Hello Everyone,

I have a power BI report and few bookmarks (called as default bookmark) which created by power bi team on that report.

I'm embedding that report in angular and allowing the user to create a custom bookmark as per their need.

I'm getting bookmark object for both user created bookmark and default bookmark and using that bookmark object I'm calling report method,

report.bookmarksManager.applyState(state)
 
For all custom bookmark, it's successfully applying the bookmark but for default bookmark I'm getting the error "http/report/....../exploration 401 (Unauthorized)" in browser console.
 
Anyone have any idea why I'm getting this error and how to fix it.
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Suryakant_99 ,

It sounds like you’re encountering a permissions issue with the default bookmarks created by the Power BI team. However, it is working for personal bookmark. Could you please check the following info?

1. Ensure enable Report.Read.All or Report.ReadWrite.All permissions.

  • Go to the Azure portal and navigate to Azure Active Directory > App registrations.
  • Select your app and go to API permissions.
  • Ensure that you have the necessary permissions like Report.Read.All or Report.ReadWrite.All.

2. If you are using service principle, please mark sure enable the service principal to use API and add it as the admin of workspace (it seems ok since creating personal bookmark work successfully)

powerbi - 401 Unauthorized: Error while retrieving Embed URL (embed power bi for customers-Python)

vyiruanmsft_0-1722220456635.png

 

3. Create the bookmarks with proper codes

PowerBI Embedded Capture Bookmark - Stack Overflow

Enhance your users' experience with bookmarks in Power BI embedded analytics | Microsoft Learn

await report.bookmarksManager.applyState(capturedBookmark.state);

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Suryakant_99 ,

It sounds like you’re encountering a permissions issue with the default bookmarks created by the Power BI team. However, it is working for personal bookmark. Could you please check the following info?

1. Ensure enable Report.Read.All or Report.ReadWrite.All permissions.

  • Go to the Azure portal and navigate to Azure Active Directory > App registrations.
  • Select your app and go to API permissions.
  • Ensure that you have the necessary permissions like Report.Read.All or Report.ReadWrite.All.

2. If you are using service principle, please mark sure enable the service principal to use API and add it as the admin of workspace (it seems ok since creating personal bookmark work successfully)

powerbi - 401 Unauthorized: Error while retrieving Embed URL (embed power bi for customers-Python)

vyiruanmsft_0-1722220456635.png

 

3. Create the bookmarks with proper codes

PowerBI Embedded Capture Bookmark - Stack Overflow

Enhance your users' experience with bookmarks in Power BI embedded analytics | Microsoft Learn

await report.bookmarksManager.applyState(capturedBookmark.state);

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.