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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lhevora
Frequent Visitor

Embedding reports with viewer permission

Hi,

I am trying to embed reports in a custom web system I've created. It is a python + js project, and I am using the following parameters to generate the token:

 

Python:

data = {
    "accessLevel": "View",
    "allowSaveAs": "false"
}
generate_token_url = 'https://api.powerbi.com/v1.0/myorg/groups/%s/reports/%s/GenerateToken'

Javascript

var config= {
    type: 'report',
    tokenType: models.TokenType.Embed,
    accessToken: access_token,
    embedUrl: embed_url,
    id: report_id,
    permissions: models.Permissions.View,
    pageView: "fitToPage",
    settings: {
        filterPaneEnabled: false,
        navContentPaneEnabled: true
    }
};

All users have Viewer permissions in the workspace, and viewer access to the report. The problem is that all of this does not work, and I receive the message below when I try the GenerateToken API :
{code: "InvalidRequest", message: "Only folder user with reshare permissions can generate embed token"}

 

If I give some user a higher privilege access, such as workspace member, it works. What does that mean? It is not possible to give only viewer permissions to embedded reports? I can't let users bypass the access control I built in my web system by accessing the reports directly on powerbi.com.

 

P.S. I already tested by giving share permission to the user (report and dataset) and the same problem occurs

2 REPLIES 2
Anonymous
Not applicable

Hi, 

Was this issue ever resolved?

I have the exact same problem. 

Many thanks, 

Melanie

v-diye-msft
Community Support
Community Support

Hi @lhevora 

 

Sorry I can't replicate your issue , it's out of our workscope. I've moved this post to Power bi develop forum. I would suggest you create a support ticket on Power BI Support page for better assistance:

Support Ticket.gif

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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