2

Hi I'm Using PowerBI Pro version. I have 10 clients and created all their dashboards on my single PowerBI account. I have custom login page where each client can login to their private space and see their dashboard and here I have pasted the secure embed code generated from PowerBI.

It is secure coz it asks to login to powerbi but I cant give my PowerBI account credentials to the client, If I do they is a possibility they can go to PowerBI login page and login using my credentials and see the other 9 clients dashboards and reports.

Is there any way to connect powerbi from code so i can login from my code itself and they can only see the dashboard of their own?

2 Answers2

1

Yes, you need to embed these dashboards and reports into your application, using app owns data scenario.

How to do this is asked many times. See for example Is there any way to embed power bi reports and dashboards in vb.net or C# desktop application with sql server 2008 database?

Andrey Nikolov
  • 12,967
  • 3
  • 20
  • 32
0

You can follow following process to enable PowerBI graph for all client without PowerBI account. To obtain an access token, you can use API calls from backend services and provide the following parameters:

grant_type=password

username=username

password=password

client_id=application ID

client_secret=application secret

resource=https://analysis.windows.net/powerbi/api

Once you have the access token, you can make another call to retrieve the embed URL. You can then use this embed URL anywhere you need it. References:

  1. Embed Service Principal- Microsoft
  2. access-the-power-bi-rest-apis-using-postman - helicaltech
  3. power-bi-rest-apis -skypoint
  4. how-to-access-power-bi-rest-apis-programmatically - sqlshack
  5. Power BI Service URL Filter - Microsoft
Kotana Sai
  • 1,207
  • 3
  • 9
  • 20
Aquib Moin
  • 23
  • 1
  • 7