There is a method of sharing the Power BI content called Secure Embed Code. This method of sharing is as simple as Publish to web to implement, but it doesn’t have the security issues of that method. Through this method, you can securely publish Power BI reports through a custom web portal or application with other users. Let’s check this method of sharing in this article in detail. If you like to learn more about Power BI, read the Power BI book from Rookie to Rock Star.
Why another embedding method?
To understand why there is another method of sharing as embedded, you need some background information about two other methods of sharing; Publish to web, and Power BI Embedded. Briefly speaking, Publish to web is a method of sharing that can be implemented very simply, with just a few clicks, but has security issues and some limitations. Power BI Embedded is a secure method of sharing, which needs a developer touch and writing code lines to implement. The Secure Embed method combines these two to achieve something secure but simple to share! Let’s check the pros and cons of each method first;
Publish to Web
- It can be embedded in any webpage easily with just a few clicks of creating the embed code.
- What you share is for everyone. No Security applied
- All report pages are visible
- Users can share it with others
- Row-Level Security is not supported
Publish to web is a very quick way of sharing, but not suitable for confidential data because it cannot be secured. Users won’t even need Power BI accounts to access the content. They can see the content and even share it with others. Everyone with that link will have access to the data. To read more about this method of sharing, read my article about Publish to Web.
Power BI Embedded
- Sharing Power BI content securely with users
- Users won’t need to have Power BI accounts. It can work on Embedded licensing.
- Row-Level security is supported
- Implementation of Embedded needs a web developer. Because coding is involved in this method
Power BI Embedded is a secure method of sharing that works perfectly for confidential data and also when you have row-level security implemented. You can even share it with users that don’t have Power BI accounts using embedded licensing. However, the disadvantage of this method is the need for a web developer to take care of every change needed. To read more about Power BI Embedded, read my article here.
Secure Embed; Good things from Both Worlds!
Now that you know the advantages and disadvantages of the previous two methods, you can feel the need for a method that can simplify the process of Power BI Embedded and, on the other hand, is secure enough to be used for confidential data. That method is called Secure Embed. Using this method of sharing, the process of creating the embed code is as simple as doing it for the Publish to Web method. However, this method is secure, as users need to be authorized. They either need to have Power BI pro accounts or be part of an Embedded licensing authorized by the person sharing the report. So with this method, you have good things from both worlds! with Secure Embed, you can simply share Power BI content securely in a web portal or application with the users. Let’s see how this method works.
Using Secure Embed
To use the Secure Embed method, go to a report in the Power BI service. From the File menu, select Embed report, and then Website or portal.
Secure Embed only works for Reports in Power BI service, not for Dashboards.
As I mentioned, this method makes creating the embed code very simple! With Just a click, as mentioned in the screenshot above, you will get the embed code and the URL to share the reports on any platform you want.
There are two outputs from the Secure embed code; the URL and the HTML embed code. The URL can directly share the reports with just a link. You can share the link with the users you want. The HTML code can embed this report in any webpages or custom web portals.
Who Can View the Report?
You’ve seen that sharing through this method is simple, but now the question is that who can view the report? Is it available for everyone with the URL link or access to the page with the embed code? No. This method of sharing is not the same as Publish to Web. Users need a Power BI Pro (or PPU) account or a report to be shared through dedicated capacity licensing. If you send the URL to someone, they will get a message that says: Please sign in to view this report.
Reports shared through Secure Embed, works with Power BI Pro (or PPU) accounts of the users (users need to log in), or with adding the report under embedded capacity.
This is not the whole story. If a user logs in, he still might not be authorized to see the report because it is not shared with them. If a users log in through a Power BI pro account but still doesn’t have access to the report, they will see a message that says; To view this report, ask the author for access.
If users accessing the report through Secure Embed using their Power BI pro accounts, the report should be shared with them from the report owner.
To share reports there are multiple ways, the most straightforward way of sharing the report is report sharing. To use that, Click on the share button on the report in the Power BI service. Or you can do that also using the Manage Permissions.
This access can also be set up through workspace or other sharing methods.
After sharing the report, then users would be able to access it using the Secure Embed. Here is a screenshot of how it would look like;
Users will have access to all pages. At the time of writing this article, isolating access at the page level is impossible, However, there is a workaround for it, which I explained here. So access to the report means access to all pages in the report. This applies to all methods of sharing in Power BI.
This method of sharing is not a free method of sharing. You will need to follow the licensing in one of these two paths;
- Using Power BI Pro, or PPU
- Using Power BI dedicated capacity (Premium or Embedded)
For using Power BI Pro or PPU, users need to have accounts, and then you can simply share the report with them, as mentioned in the above illustrations and steps. Another option is to use dedicated capacity. An important point here is that even if you have embedded licensing, the user has to log in to the page to see the Secure Embed. This is different from the Power BI Embedded, where you can use Power BI users or custom application users. A custom application user setting won’t work with the Secure Embed.
Advantages of the Secure Embed
After seeing how it works, you can now name some advantages yourself. Here is the list of advantages of the Secure Embed method.
Sharing with Only a Few Clicks. No Developer Needed
As you have seen in this post, I haven’t written a single line of code; it works by using the Secure Embed option easily. All you need to do is use the URL output of the Secure Embed or embed the HTML code on a webpage you want. Unlike Power BI Embedded (which needs a developer touch), this method is very simple to implement.
Looking at the title of this method of sharing, “Secure Embed,” you probably guessed it. You have also seen in this post, through an example, how the content is secured for only those users who are authorized to see the content. Unlike Publish to web, this method is a secure method of sharing.
Row-Level Security is Supported
Publish to web method doesn’t support row-level security because there is no concept of the user logging in because no login is required. However, using Secure Embed, only authorized users will have access to the report, and as a result, row-level security is possible.
Some Limitations of Power BI Embedded about the content to be shared applies. For example, ArcGIS Maps is not currently supported.
Secure Embed, at the moment, doesn’t support dashboards or paginated reports.
Another significant limitation of Secure Embed is that it won’t work with custom applications’ user setups. If you use the Secure Embed method, you must use Power BI user accounts. If you want to use a custom applications’ user base, then your better choice will be Power BI Embedded.
Scenarios of Using this Method
This method is a quick way of sharing through an HTML embed code. If you are using SharePoint Online, there is a quick method to use for that (read more about it here), but what about other web applications? What about SharePoint on-premises? or another web application you want to embed the Power BI content in there? This method can be a great option to securely share quickly through a web page.
Secure Embed is neither Publish to Web Nor Power BI Embedded. It is getting good things from both worlds! Using Secure Embed, you can share your reports through a web portal with just a few clicks. However, unlike Publish to Web, the Secure Embed is a secure method of sharing, that only authorized users will have access to the data. As a result, this method also supports row-level security-enabled reports. However, there are scenarios that still Power BI Embedded that can be a better option to use (for example, if you want to use the custom applications’ user base)
Other sharing methods are explained below.