Ragavan Rajan
Ragavan Rajan

Reputation: 4397

Accessing powerbi desktop from Single Page Application(SPA)

We currently have a single page application (SPA) developed in Angular 8

What I would like to achieve is upon clicking one of the menus( Connect to PowerBI), I would like to open the powerbi desktop and achieve the below scenario.

enter image description here

Scenario:

  1. Currently dialog box is prompting users to pick the Web API endpoints from the drop down they want to connect.
  2. Once they have selected their endpoint then the next prompt will ask their API key (BASIC Authorization). Because our old APIs have designed using BASIC authorization.

3 . Pass the selected values ( Endpoint + API key) on the run time to trigger and open the POWERBI desktop web API request? Is this possible?

Appreciate any work around or help on this.

Upvotes: 0

Views: 204

Answers (1)

Andrey Nikolov
Andrey Nikolov

Reputation: 13440

You can prepare a .pbix file for the "template" report, but use parameters for the endpoint and API key. Upload this report to Power BI Online. When your site knows the values for the endpoint and API key, use Power BI REST API to clone the template report, update the parameter values of the clone and then download the .pbix file, which when opened by the user, will connect to the specified endpoint.

If this is an option for you, it will be easier though to save this .pbix file as template (.pbit) and serve it directly to the user. When it is opened, it will show a dialog to enter values for the parameters, where the user will enter the endpoint and API key. But in this case they will not be know to you, because they will not be entered in your web site.

Upvotes: 1

Related Questions