cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

PowerBI Embedded Create Report based on Dataset

I am trying to create PowerBI report using PowerBI Embedded SDK , I have followed below github article.

 

https://github.com/Microsoft/PowerBI-JavaScript/wiki/Create%5CEdit-Report-in-Embed-View

 

Could you please elaborate on how to generate the access token?

 

Accesstoken generated using below code is not valid and it return 403 error on PowerBI.createreport function. 

 

using Microsoft.PowerBI.Security;

// rlsUsername and roles are optional
string scopes = "Dataset.Read Workspace.Report.Create";
PowerBIToken embedToken = PowerBIToken.CreateReportEmbedTokenForCreation(workspaceCollectionName, workspaceId, datasetId, null, null, scopes);

var token = embedToken.Generate("{access key}");

 

Also where to get the Access Key as show in last line of above code?

 

Thank You

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.