PowerBI Embedding – AppOwnsData

There are two main scenarios for embedding Power BI content:

Watch this: https://www.youtube.com/watch?v=5OF0s2t0N3w



If you need to see how it works in single page web application, please scroll down to the end of this article.

Read this article first:

The script in above article can be downloaded from here:


1. Update the parameters, then execute the script.
2. Ensure step 4 in that article: new AzureADGroup should be in “Developer settings” -> “Allow service principals to use Power BI APIs”

3. Verify Service Principal (application name) in Group Members

4. Verify AzureADGroup and Service Principal are having Admin permission in Power BI workspace


For testing an embedded app: Clone the Power BI Developer Sample at https://github.com/Microsoft/PowerBI-Developer-Samples. Open the App Owns Data solution in Visual Studio. Edit the following sections of the Web.config file. Include your Application ID (for your service principal), workspace ID and report ID.

5. Go to the solution in Visual Studio, ensure $key in step 2 is using as “applicationSecret” in web.config (we can also use the key generated in App Registration -> Certificates & secrets)

6. Optional: Go to Azure portal, grant permission in Enterprise Application and App Registered if needed

Single Page Web application for Power BI Embed

1. Clone the source at: https://github.com/CriticalPathTraining/PowerBiEmbedded

2. Go to “Demos\PowerBiDaySPA” and open it using Visual Studio Code

3. Open “AppSettings.ts” and modify value


4. Run npm install if needed

5. npm run start to try the embed in single page application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s