Setting on portal

Display (Embed) Power BI report in Angualr UI

Create report in PowerBI

refer: https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers https://www.youtube.com/watch?v=0y2oJikC6Xc

Power BI web portal: https://app.powerbi.com/


Create workspace

  1. Create workspace

    Workspace->Create a workspace->New --> name[wiseclient] Enable access -> from the More menu, select Workspace access. --> PowerBIGroup ->select Admin ->Add

  2. Update Credentials: Report, mouse right, [Setting]: clicked on Edit Credentials and simply pressed Sign-in.

  3. Change referesh time [Setting]: select 15 minutes on Scheduled referesh


Design report in PowerBI Desktop

Power BI Desktop -

  1. Copy weight-report.pbix and weight-vision.pbix,

    • open .pbix use Power BI Desktop

    • select WEIGHTING on right side, ... edit query,

    • Press Source, change Server and Database with new (Azure SQL) Server: tcp:nwiapps.database.windows.net,1433 Database: user name, password -- some columns may need to update

    *** Do not switch all tables to import mode ***

or Create new Power BI app: new -> Get Data -> A. select SQL Server database -> Server: tcp:nwiapps.database.windows.net,1433 Database: **

or B. select Azure Data Explorer (Kusto)-> -> Connect: cluster: https://nwiiot.australiaeast.kusto.windows.net

Data type convert and design:

2. Publish to new workspace that created by Power BI web portal, replace (if has existed)


[GroupId],[ReportId] - PowerBI

  1. Open PowerBI portal, Select new report has created by Power BI Desktop

    URL example: https://app.powerbi.com/groups/###########/reports/@@@@@@@@@@@@/ReportSection

    GroupId(Workspace): (afer ../groups/): ########### ReportId: (after ../reports/): @@@@@@@@@@@@

  2. Update [GroupId] and [ReportId] in constants.ts (Angular UI)


Add API access

In new workspace, => Access entry PowerBIGroup => Add

select right top ... > Settings > Settings Datasets=> Scheduled refresh : 15 minutes

select right top ... > Settings > Admin portal. Select Tenant settings and then scroll down to the Developer settings section. Expand Allow service principals to use Power BI APIs, and enable this option.

Group -> [PowerBIGroup] => Add members -> new workspace name has created

App Registration in Azure portal

refer: https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-app-registration https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-core

Azure portal: https://portal.azure.com/


Registration and Authentication

A. Register an applicatioin

B. Add Authentication URL

C. Add API permissions


[ApplicationId],[TenantId],[SecretId]

run API App to test embedUrl and accessToken

Update by Steven, July 2022

Last updated

Was this helpful?