A collection of Power BI samples for developer use.
Clone or download
may-hartov Merge pull request #56 from Microsoft/dev/mahrtov/renamedClientToAppA…

renamed client ID and secret -> application id and secret. group -> w…
Latest commit b5fb47b Jul 17, 2018


App Owns Data samples

Read this documentation to prepare your environment https://docs.microsoft.com/en-us/power-bi/developer/embedding-content

To see embedded report, dashboard and tile, you need to fill missing details in web.config.

clientId - Id of AAD application registered as NATIVE app.

groupId - group or workspace Id in Power BI which contains reports, dashboards and tiles you want to embed.

pbiUsername - Power BI username (e.g. Email). Must be an admin of the group above.

pbiPassword - password of Power BI user above.


For security reasons, in real application, don't save the user and password in web.config. Consider using KeyVault

User Owns Data samples

Please follow these steps to run PowerBI.com Integrate samples:

Step 1 - App Registration

You need to register an application in https://dev.powerbi.com/apps

Registration parameters per sample


Redirect URL - http://localhost:13526/Redirect

Home Page URL - http://localhost:13526/


Redirect URL - http://localhost:13526/

Home Page URL - http://localhost:13526/


Redirect URL - http://localhost:13526/

Home Page URL - http://localhost:13526/

Registration Example:


Step 2 - Change Cloud.config

Copy Client Id and Client secret to web.config file



Visual Studio 2013

To resolve a 'CS0012:Predefined type 'System.Object' is not defined or imported' error, please update web.config.

Find line:

<compilation debug="true" targetFramework="4.5"/>

And modify it to:

<compilation debug="true" targetFramework="4.5">
   <add assembly="System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />   


Power BI Support Page

Power BI Ideas