The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm working on embedding a power bi report for organization in a simple html page to enable personal bookmark, but i'm running into issues while generating token to embed. I have successfully embeded the report for embed for customers.
Steps I have done:
1. Created an app in azure and povided delegated api permissions Report.Read.All, Dataset.ReadWrite.All and granted admin consent. As the html page is my desktop added redirect url as https://localhost. Then ceated an security group under the created azure app.
2. In power bi service tenant setting, enabled the api permissions by adding the security group.
3. Using postman, I have generated access token and using access token generated embed token.
4. Added the security group and service principal to the workspace which contains the report. The workspace is a pro workspcae not premium.
HTML Code used:
<script src="https://cdn.jsdelivr.net/npm/powerbi-client/dist/powerbi.min.js"></script>
<script>
var models = window["powerbi-client"].models;
var embedConfig = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: 'generated access token', // Using the token generated from Postman
embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=report_id&groupId=grou_id',
id: 'report_id',
permissions: models.Permissions.All,
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
var reportContainer = document.getElementById('reportContainer');
var report = powerbi.embed(reportContainer, embedConfig);
</script>
I want to embed the report for organization instead of customers to enable personal bookmark. Could you please help on the steps to generate token to embed the report
Solved! Go to Solution.
Hi @mstt,
Thanks for reaching out to the Microsoft fabric community forum.
In an Embed for Your Customers solution, your web app must determine the Power BI content that each user can access. To manage this, use the Embed Token REST API to generate an embed token, defining:
1) The specific Power BI content the web app user can access.
2) The user's access level (view, create, or edit).
Please check out this reference article on how to generate access token using Embed for Organization:
Permission tokens needed to embed a Power BI app - Power BI | Microsoft Learn
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards
Hi @mstt,
Thanks for reaching out to the Microsoft fabric community forum.
In an Embed for Your Customers solution, your web app must determine the Power BI content that each user can access. To manage this, use the Embed Token REST API to generate an embed token, defining:
1) The specific Power BI content the web app user can access.
2) The user's access level (view, create, or edit).
Please check out this reference article on how to generate access token using Embed for Organization:
Permission tokens needed to embed a Power BI app - Power BI | Microsoft Learn
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards
Hi @mstt ,
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards
Hi @mstt ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards
Hi @mstt ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards