Sharing Power BI Reports with Secure Embed code

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

Publish to web for Power BI report

Pros

  • It can be embedded in any webpage easily with just a few clicks of creating the embed code.

Cons

  • 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

Power BI Embedded

Pros

  • 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

Cons

  • 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.

Secure Embed in the Power BI service

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.

Getting the secure embed link from the Power BI service

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.

Sign-in is needed for the users of the Secure Embed code.

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.

Manage permissions on the Power BI report

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;

Secure Embed report is opened through the web browser

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.

Licensing Needs

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.

Secure Sharing

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.

Limitations

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.

Summary

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.

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.

15 thoughts on “Sharing Power BI Reports with Secure Embed code

  • Hi, thanks for your post!! Do you know if this also work for Premium capacity the way it works for Embedded capacity?

  • We have Power BI Premium license in our O365 tenant. We have added all workspaces to a capacity in Premium setup. We have added specific (non-pro) user accounts to a workspace and dataset row level security role. When the Pro user creates and publishes a report and then uses the Embed Securely feature the link does NOT work for non-pro users. They receive the “To view this report, ask the author for access” error message. If we share the same report with one of the users, they are able to open the report from the provided link, though it opens in their Power BI service. If the user logs into powerbi.com and tries to open the report from the workspace, they receive the access error message again. I have spent the day searching for anything on this and your blog was the only one where the same error message was coming up. Any insight into what might be occurring here? We really want to avoid having our users access the reports through the Power BI web service, can’t share/subscribe all 3k users to each report when we make them…

    • Hi Louis
      Have you tried to embed it in a page and see what is the result? I don’t think they will be redirected to the Power BI service then
      Cheers
      Reza

  • Hi Reza,
    Thank you for such an Informative article,
    I have created dashboard top of ERP, which has MariaDB as a database,
    which I have connected successfully through Amazon RDS and working fine.

    I want to integrate this dashboard in ERP as a module/doctype which can be accessed by ERP users having individual login credentials (Not having PowerBI Subscription),

    what kind of licensing /set up I would require to make this happen
    so that dashboard can be accessed by all users on a real-time basis with refreshed data from ERP

    • Hi Alad
      If your ERP system users are using O365 logins, then best way to extend their licenses to something that have Power BI in it and share it through that.
      If their ERP accounts are not O365, then you can use Power BI Embedded or Secure Embed as mentioned here. You have to buy an embedded licensing EM sku or A sku, which is capacity based and has a limitation based on the page render capacity.

      Cheers
      Reza

  • Hi Reza,

    the following requirement roughly:
    On the basis of SharePoint Online, a portal is to be created in which Power BI evaluations are to be integrated. (including RLS)
    + External users should access it.

    Is this possible for external users to access it with this method? What about licenses and permissions?

    Thanks in advance!

    Denis

    • Hi Denis.
      External users can access Power BI report using Apps or even workspaces, or even normal sharing. However, when you embed the report in SharePoint online, then part of the access is handled through SharePoint. For that part, you should ask a SharePoint expert to see if external users can access to those pages or not. from the Power BI side; it is possible.
      Cheers
      Reza

  • Hi
    Can i use power bi to show different content based on the logged in user?!It means every user will see the same report but filled with his own data.

Leave a Reply