Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have embedded the power bi report using service principal as given here.
I'm generating the embed token as below,
var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel:"View",allowSaveAs:false,identities: new EffectiveIdentity[] { new EffectiveIdentity(username: serviceAccount, roles: new string[] { "Viewer" }, datasets: new string[] { report.DatasetId }) });
EmbedToken embedToken = client.Reports.GenerateTokenInGroup(groupId, reportId, generateTokenRequestParameters);But when I embed the report using javascript sdk, if I configure the permission as below the user able to edit the reports. How can prevent the user from editing the report in the embed token?
permissions: models.Permissions.ReadWrite, viewMode: models.ViewMode.Edit,
Hi @Anonymous ,
You may modify above code as below to grant read-only permission.
permissions: models.Permissions.Read, viewMode: models.ViewMode.View,
For detailed description and sample code, please see: Embed Configuration Details
Best regards,
Yuliana Gu
Hi @v-yulgu-msft ,
Thanks for your reply. But some one can potentially change the line as below and update the report.
permissions: models.Permissions.ReadWrite,
viewMode: models.ViewMode.Edit,
Thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 10 | |
| 10 | |
| 4 | |
| 3 | |
| 3 |