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