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.
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/.
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.
The Playground is where you can also see other APIs and functions available, try them, and see their code in action.
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.
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.
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.
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.
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.
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.
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.
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.
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.