Renders an embedded Power BI report using an MSAL-obtained embed token, with an org-level row-level security filter applied for the current user.
POWERBIEMBED — set as ReportType in def_report.
def Render(self, Param1="", Param2="", Param3="") -> str:
Params are unused. Fetches an embed token and embed URL from the Power BI REST API via PbiEmbedService, then queries sys_user to obtain the current user's store (org level) and Usergroups. Applies a basic filter on org_level_descedent.ORG_LEVEL_NO. Users in SWITCHX or SU groups see the filter pane. Returns an HTML fragment containing a <section> embed container and minified Power BI SDK initialisation script.
Requires msal, requests, and flask. Power BI credentials (user, pass) are read from config.yaml under the active package's powerbi section. Workspace ID and Report ID are hardcoded in the BaseConfig class and must be updated per deployment. Supports MasterUser authentication mode; ServicePrincipal mode is partially implemented. Loads the Power BI JS SDK 2.15.1 from cdnjs.