PowerBI embed reports using nodeJS as back-end and angular2 as front-end. It's doing authentication using Azure AD account.
Express.js: http://expressjs.com/
Angular 2: http://angular.io
Node.js: https://nodejs.org
Make sure you have angular cli installed.
$ npm install -g angular-cli
Clone the repo
$ git clone https://github.com/tusharbudhe0302/powerbiembed-mean-stack-ng2.git
$ cd powerbiembed-mean-stack-ng2
Install dependencies
$ npm install
- Go to directory Server --> Config --> Edit app.config.js
- username Username Azure
- password Password Azure
- clientId Applicaton ID of app registered via Azure Active Directory - stored in config
- dashboardId Dashbord ID for embedded reports
- groupId Group ID for embedded reports
- azureADAurthUrl URL for Azure AD user authentication
- reportsUrl URL for genrate embedded token
Start API
$ npm run startapi
- Make sure to test API first :
- http://localhost:3000/api/aurth/accesstoken
- http://localhost:3000/api/aurth/reportembaddedtoken/ReportId How to get Report Id?
- http://localhost:3000/api/aurth/dashboardembaddedtoken/DashboardId How to get Dashboard Id?
- http://localhost:3000/api/collection/reports
- http://localhost:3000/api/collection/dashboards
Run the app
$ npm start
If you got saas or css exception.Please execute below command and Run the app again.
$ npm run nodesaas