Power BI Embedded; Power BI in a Custom Application

2017-06-26_20h52_57

Power BI leverages a very powerful method of sharing named Power BI Embedded. This method of sharing is important because of mainly two specific features of it. With this method, you can share Power BI content in your custom application, and you can share it with your custom application users, regardless if they have Power BI accounts. In this article, you will learn everything about Power BI Embedded, including but not limited to its scenarios and how to implement it.

When to think of Power BI Embedded?

Power BI has strong and compelling sharing methods for organizations, such as workspaces and Power BI Apps. However, there are scenarios where you may find a better sharing method. You usually need to think of the Power BI Embedded when you have scenarios like these:

  • You want to share the Power BI report with users who do not have Power BI accounts, but your report needs to be shared securely so that only authorized users can see the content.
  • You want to embed the Power BI report inside your custom application. This might be because your users are already using a custom application for other operational tasks, and having Power BI report in the same application, will give them a central point of work.

An example of these scenarios is an ISV company with customers from all other companies; their Office 365 tenant might be entirely different for every company. If the ISV company wants to share the Power BI report with all clients, it first has to create Power BI accounts for each client in their tenant and then publish the Power BI report separately to each tenant. This process involves lots of extra work.

Power BI Embedded is a big help for our ISV company mentioned above. ISV company can embed Power BI reports in a custom ASP.NET application and then create users and passwords as part of the application. The username and password of the application are not Power BI users, of course. Everyone who has access to that page can consume the report.

What are things you need to know Before using Embedded?

There are a few things you need to know before choosing Power BI Embedded as your method of sharing:

  • Licensing of Power BI Embedded is Different. The page renders matters.
  • Power BI Embedded doesn’t have all features of Power BI services (such as subscriptions, alerts, etc.).
  • You need a web developer to handle embedding and any further changes.

Power BI Licencing is either per user (Free, Pro, and PPU) or capacity-based (Premium or Embedded). Power BI Embedded is a capacity-based licensing, However, the capacity specification for entry nodes for the Embedded is very limited. It is important to choose a capacity that can cover the workload. Page renders can be a good indication of which licensing plan is good for it.

When you use Power BI Embedded, you won’t be using Power BI service. As a result, you will not have features such as Usage Metrics (per-user details) reports, Alerts, subscriptions, and features like those which are specific to the service. You can obviously implement anything you want, but you need to have a good web developer on your team.

Power BI Embedded embeds a report into an application and needs a web developer to take care of this process. It is not just about the embedding itself; that may be a one-off process. When you embed the report into your application, all other requests come after that. You would need to manage users and memberships for your web application. You may want to have a usage analysis of the report. You may want to have different levels of access to each report. Every extra feature comes as a request for the web developer to implement it. It is possible to implement, but these all come at the cost of hiring a web developer.

Myths about Power BI Embedded

Power BI Embedded enhanced significantly recently. There are many myths about this method that needs clarification:

  • Power BI Embedded only works with Live Connection, not Import Data or scheduled refresh. This statement is a myth.
  • Power BI Embedded does not support all data sources. This statement is a myth.
  • You can only embed the Power BI report, not the dashboard neither Q&A. This statement is a myth.
  • Row Level Security is not possible with Power BI Embedded. This statement is a myth.

Many of the above statements were correct at the beginning phase of the Power BI Embedded (perhaps in 2015 or part of 2016). However, with heaps of recent updates and enhancements in this technology, you can achieve all items mentioned above with Power BI Embedded. For your peace of mind, a Power BI team is only focused on Embedded features, and they are working hard to bring more features to this technology regularly.

What is Power BI Embedded?

After explaining all these about Power BI Embedded, now is time to talk about what Embedded is. Power BI Embedded is embedding the entire or part of a report, dashboard, or dataset with Q&A in a custom application. This embedding is fully secure because it will leverage authentication keys and tokens. This way of embedding is not like Publish to the web. Publish to the web is not a secure method; however, Power BI Embedded is fully secure and customizable.

Embedded Playground

There is no place better than the Power BI Embedded Analytics Playground to familiarize yourself with the Embedded functionality and all the necessary codes. You can get to the Playground from a Power BI report, as shown in the screenshot below. Or you can directly go to: https://playground.powerbi.com/.

Getting your report to the Power BI Embedded Playground

If you navigate to the Developer Playground using the method shown in the screenshot above, it will open the Playground with your report; then, you can see what your report will look like in an embedded solution.

Power BI Embedded Playground

The Playground is where you can also see other APIs and functions available, try them, and see their code in action.

Trying APIs in the Power BI Embedded Playground

The Embedded Playground is perfect for a developer to start learning about some functions and how they work in code.

Licensing of Power BI Embedded

Power BI Embedded is based on capacity sizes, and each capacity can cover some workload. Every time you open a page with a Power BI object, it is considered a page render. If you click on a slicer, the page renders again; if you click on a column chart and it causes other parts of the report to slice and dice, this counts as another page render. Knowing how much page renders in the peak hours of operation you may have is good.

Power BI Embedded Pricing

This list is coming from: https://azure.microsoft.com/en-us/pricing/details/power-bi-embedded/.

The cost may look high; however, you get a different result for different scenarios. For a month of service with Power BI Embedded for about 300 page-renders per hour (which an A1 should be enough), you need to pay about $700 USD, and 300 page-renders should be enough for normal users of about 100 users. If you pay 100 pro users, on the other hand, you need to pay $1,000 USD. This is a scenario that Power BI Embedded can be cheaper than Power BI service. However, for every scenario, the process needs to be considered separately.

Some SKUs can be turned on or off.

A very helpful feature of the Power BI Embedded is that it can be turned off or on with some SKUs. There are two ways to get Power BI Embedded licensing;

  • A SKUs (the table above), These SKUs are part of Azure licensing
  • EM SKUs, These are part of Office 365 licensing

A-SKUs can be turned off on the hours that there is no operation. For example, the embedded capacity can be turned off for a company where the staff is from 9 am to 5 pm eastern time, and no one works after hours. As a result, the organization can save money (that is why you see the hourly prices based). Or if it is close to the end of the month, that is, peak days for the reporting, the SKU can be upgraded to a higher level and then downgraded to a lower level. This will ensure the reports’ high performance and keep the costs at a minimum.

To learn more about the difference between A and EM SKUs for Power BI Embedded, check out the licensing article here.

Power BI users or custom application users

Power BI Embedded can work in two ways with the users. You can use the users in your custom applications. These users may or may not have a Power BI account; they may not even have an Office 365 account. The other method is to leverage the Power BI accounts for the users and share the content using embedded with them. This latter method works similarly to the Secure Embed code.

How to Implement Power BI Embedded

This part needs some development talks; If you are not a developer, and don’t want to get into the coding part of the Power BI Embedded, then you can skip the rest of this article (or send it to the web developer in your team). If you are a developer and want to learn how to use Power BI Embedded, then keep reading. Below articles are all about implementing Power BI Embedded and using REST API step by step.

Part 1: Register your Application

The first step is to register your application. What does that mean? Any application which wants to interact with Azure should be registered and authorized through a process.

2017-06-25_10h22_08

Part 2: Authenticate

Every application that wants to interact with the Azure environment should undergo an authentication process. This authentication process passes Client ID (and sometimes Client Secret) to Azure and gets an authentication code. From this authentication code, an access Token can be fetched. This access token is a property that should be involved in every request sent from your application to Power BI and Azure afterward. Without this access token, your requests will fail.

2017-06-26_20h19_10

Part 3: Embed Content

In this step, you will learn about codes and the method to embed the content into your application after registration and authentication of the application.

2017-06-25_12h06_03

Part 4: Refresh Data Set

Power BI REST API is not just for embedding content or getting a list of dashboards and reports. It also has many functions to work with data sets, gateways, and data sources. One of the many exciting features of that is that you can quickly refresh a dataset from an application. You can refresh it as many times as you want. With any frequency you want. You can refresh your data set after ETL runs through a console application. Or you can have a service application that kicks off a refresh every minute! There is no limitation for your data refresh anymore! Let’s check it out.

Part 5: Data Sources and Gateway Management

The REST API of Power BI is powerful. In addition to embedding content in Power BI or refreshing datasets from API, it also gives you many functions to work with Gateways and Data Sources. With this API, you can set up new data sources, clone data sets, check a data source’s credentials, get a list of all data sources under a gateway, and do many other operations. In other words, Data source management can be fully automated with REST API. Continue reading this post if you like to learn more about this.

Part 6: Real-time Streaming and Push Data

In this last article, I explained one of REST API’s functionalities: pushing data to a Streaming data set. I’ve previously explained how to do real-time streaming using Azure Streaming Analytics and Power BI. However, this post explains real-time functionality just with the REST API. You won’t need azure services besides it.

Summary

Power BI Embedded brings Power BI into your application. Imagine the analytical power of Power BI combined with your custom application. The result would be revolutionary. You can leverage your users, interact with your web application’s embedded object of Power BI, and implement many scenarios such as customized refresh and many other features. This method, however, works on a different licensing plan, and you would need a web developer for it.

Other sharing methods are explained below.

Reza Rad on FacebookReza Rad on LinkedinReza Rad on TwitterReza Rad on Youtube
Reza Rad
Trainer, Consultant, Mentor
Reza Rad is a Microsoft Regional Director, an Author, Trainer, Speaker and Consultant. He has a BSc in Computer engineering; he has more than 20 years’ experience in data analysis, BI, databases, programming, and development mostly on Microsoft technologies. He is a Microsoft Data Platform MVP for 12 continuous years (from 2011 till now) for his dedication in Microsoft BI. Reza is an active blogger and co-founder of RADACAD. Reza is also co-founder and co-organizer of Difinity conference in New Zealand, Power BI Summit, and Data Insight Summit.
Reza is author of more than 14 books on Microsoft Business Intelligence, most of these books are published under Power BI category. Among these are books such as Power BI DAX Simplified, Pro Power BI Architecture, Power BI from Rookie to Rock Star, Power Query books series, Row-Level Security in Power BI and etc.
He is an International Speaker in Microsoft Ignite, Microsoft Business Applications Summit, Data Insight Summit, PASS Summit, SQL Saturday and SQL user groups. And He is a Microsoft Certified Trainer.
Reza’s passion is to help you find the best data solution, he is Data enthusiast.
His articles on different aspects of technologies, especially on MS BI, can be found on his blog: https://radacad.com/blog.

17 thoughts on “Power BI Embedded; Power BI in a Custom Application

  • Hello Reza
    Your explaination about PowerBI is very elaborative and precise. but i still have little confusion about REST API, PUSH DATA , POWER BI EMBEDDED. are these three same things ? please explain

    • Hi Asim,
      REST API is the .NET api which you can then interact from your .NET application with Power BI objects in the service. it is not just for embedding. it can be used for refreshing data set, managing gatewaya and many other features.
      Power BI Embedded; is using that api and the JavaScript embed code only to embed the report into a page.
      PUSH Data; is using the REST api to push data entries to a streaming dataset, so you can see real-time result in a dashboard.
      all of these are different usage of the REST API basically.
      Cheers
      Reza

  • Reza, our community college is getting a new software ERP system to replace our old custom system that is 20+ years old. The new system, Campus Nexus, says it has Power BI embedded in it. What does that potentially mean as to whether/how many actual Power BI Pro licenses we might need to purchase for our employees to make best use of Power BI internally? We’ve been trying to understand this, but it’s very confusing.

    • Hi Leslie.
      It depends. If it is an embedded, then it should be under Embedded licensing (Not pro per-user licensing). They may ask you to pay for the embedded capacity. Which has its own pricing plans or they pay themselves, based on the subscription fee they get from you. If they charge a one-off price at the beginning, then probably, you are responsible for paying embedded licensing. if they charge monthly, then it might be the case that the licensing of Power BI embedded is already covered in the fee that you are paying.
      another case is that they use the Publish to Web link, and call it embedded. I doubt that be the case, because if that be the case, then everyone with the link can access their report.
      or they might have used the Secure Embed features. However, this one is very new, and not sure if that company has already implemented anything with it.
      Best would be asking them how is their Power BI licensing works for the embedded report.

      Cheers
      Reza

  • Reza, we are looking at using Power BI Embedded on Azure. We want to create an app with embedded Power BI objects in it. What Power BI licences do we need to develop and deploy the app. We will have a user base of approximately 150 users. Note: we have a limited budget so we need a cost effective solution. I understand we need Power BI Pro for development, but can we deploy with it? Do we need Power BI Premium to deploy, as the cost would be too much for us?

    • Hi Nick
      You do need Power BI pro account to develop, and you can use the same to deploy.
      then you just need Embedded licensing, Premium works as well, but not needed for this case. You can purchase A* or EM* licenses of Power BI Embedded based on your need.
      Cheers
      Reza

  • Hello Reza,
    We have different customers and they have their own SQL Databases(Not Azure SQL Database).
    There is one application with embedded reports and different APP workspaces that have power BI reports and gateway to connect to database.
    My question: Can we get database name and server name with connection strings via application and pass to power BI? Does Power BI Embedded work in this way?
    Thank you in Advance

    • Hi Nicki.
      Yes, you can. Using the Power BI REST API, you can connect to a gateway, configure, or add data sources, and bind it to datasets in the service, and also refresh the dataset.
      Cheers
      Reza

  • I have implemented the power bi embedded, how to I convince my customers to use my platform/embedded application? Will the reason be that is it more secure and cheaper?

    • One of the main benefits would be the price point as you mentioned.
      However, the “more secure” is only valid if you compare Power BI embedded to Publish to Web. If you are comparing it with other methods of sharing through Power BI service, then they are all equally secure.
      Cheers
      Reza

  • Hi Reza, is there any documentation somewhere that lists the features that PowerBI Embedded does not have versus Power BI services. You mentioned subscriptions and alerts. I am wondering if there is anything else that you can think of. We are looking at PowerBI Embedded as well as some other vendors and are trying to create a comparison matrix. Thanks!

    • Hi Jay.
      I would say everything that you see in the Power BI Service (website) will be missing in the embedded. Because you won’t be using the Power BI service for sharing your report. You will host it in your own custom web portal/page
      Cheers
      Reza

  • Hi Reza,

    I am still not clear about the points. Suppose I am a developer and I have a power bi pro-licence and I build up reports connected to my local SQL server. After publishing the reports to app.powerbi.com and configuring gateway, I do need an embedded licence if I want to integrate those reports into my internal web application, right?

    Regards,

    Nemo

    • Hi Nemo,
      Yes, correct. with embedded license, you get a dedicated capacity, which you put your PBI workspace on it, and then publish your report under that workspace, and then embed the report into your application.

      Cheers
      Reza

Leave a Reply