Embed the Report in Power Pages: Add the Power BI report to your Power Pages site using the Power BI Embedded component or an iframe with an embed link. Use the Power Pages Design Studio or custom HTML/JavaScript to embed the report.
Enable Single Sign-On (SSO): Configure SSO between Power BI and your portal using Azure AD authentication. This ensures the logged-in user's identity is passed to Power BI for RLS.
In Power Pages, fetch the user's assigned AccountNumber
using Liquid templates or JavaScript. {% assign accountNumber = user.accountnumber %}
Use the Power BI JavaScript API to pass the AccountNumber
dynamically to the report. let models = window['powerbi-client'].models;
let config = {
type: 'report',
embedUrl: 'https://app.powerbi.com/...yourReportEmbedUrl...',
accessToken: 'yourAccessToken',
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
}
};