Demystifying Power BI — APIs and Embedded Analytics for Developers
A summary and overview of APIs and Embedded Analytics in the Power BI ecosystem
The capabilities offered by Power BI are extended beyond the Power BI service with the help of APIs and embedded analytics. APIs provide the flexibility to build automation, and embedded analytics enables developers to consume Power BI content from custom applications.
This article will briefly discuss the available APIs for automation in Power BI for both techies and tech illiterates. We will also look at embedding options for developers to embed Power BI content in applications and web pages.
This article is a part of the multipart series on the Power BI ecosystem and continues the concepts introduced in the introduction article and refers heavily to the Power BI back-end platforms. We recommend reading through both articles for a complete understanding.
Demystifying Power BI — Understanding Power BI Ecosystem and Landscape
A dummy’s guide to simplifying and understanding the Power BI Ecosystem
APIs for Automation
An essential aspect of Power BI is the automation of routine monitoring and governance activities. APIs provide a programmatic way to manage Power BI. Developers and administrators can use the APIs to build automation pipelines to reduce workloads. In addition, traditional users can leverage Power Automate to build flows to suit their automation or recurring needs.
Power BI Developer Center is one-stop shop for Power BI Developers to find documentation and samples.
Power BI Developer Center | Microsoft Power B
Showcase your business data in context with stunning interactive data visualizations in applications, websites…
PowerShell Cmdlets: Power BI offers PowerShell Cmdlets to work with Power BI content. A feature that most developers find helpful is the flexibility of constructing arbitrary REST API calls against Power BI. So if a specific cmdlet is missing, you can still get the job done if there is an appropriate REST API endpoint for you to call. PowerShell Cmdlets also work with Power BI Report Server, though there might be some support parity compared to the Power BI service.
A brief list of typical tasks that the PowerShell cmdlets can help accomplish efficiently includes automating recurring tasks using arbitrary REST API calls and third-party cmdlets without registering an application in Azure. Some examples include:
- Compile a list of workspaces and their properties
- Compile a list of objects per workspace
- Extract Power BI activity log events
- Execute a REST API command
- Enable customer-managed key encryption for Premium capacity
- Retrieve the list of gateway clusters
- Check status and update attributes for a gateway
REST APIs: The Power BI REST APIs provide service endpoints for embedding, administration, governance, and user resources. REST APIs provide a richer set of commands compared to PowerShell Cmdlets. In addition to data management and working with embedded content, the Power BI REST APIs can be used to handle many everyday administrative activities:
- Export a report
- Clone a report to another workspace
- Trigger a data refresh for a dataset
- Check the refresh history for a dataset
- Grant or revoke user permissions
- Take ownership of a dataset
- Update credentials for a data source registered to a data gateway
- Run deployment pipelines
- Embed Power BI Content
The “Try It” tool lets users explore how each REST call works, the required parameters, the structure of response or errors, and what data comes back, all within a minute!
.NET Client Library: Power BI public REST endpoints are also available as a .NET client library, providing access to Workspaces, Reports, Datasets, and more.
Power BI Embedded Azure Resource Manager (ARM) REST APIs: Azure Resource Manager REST APIs provide a set of REST commands to create, retrieve, update, and delete Power BI dedicated capacities in Power BI Embedded (A SKUs).
Microsoft 365, Azure Active Directory, and Microsoft Graph REST APIs:
REST APIs from Microsoft 365, Azure Active Directory, and Microsoft Graph can be very helpful for managing user and licensing aspects of Power BI. Such as:
- Locating full username and department
- Compiling a list of users assigned to a group
- Assigning Power BI Pro and Premium Per User (PPU) licenses
- Finding users who have and have not signed into Power BI
- Get information for sensitivity labels
Power Automate: Power Automate provides several out-of-box actions to interact with Power BI. Power Automate simplifies designing automation based on external conditions and requirements. Power Automate is the perfect low-code alternative for APIs.
Moreover, adding a new Power BI action in Power Automate is straightforward and empowers users to design custom flows and processes quickly. The following article explains adding a custom action in Power Apps.
Creating a Power Apps Custom Connector from API Documentation for Power BI
A short guide to making a Power Apps/Automate custom connector for Power BI from scratch
Power BI embedded analytics allows enterprises and software vendors to embed Power BI content, such as reports, dashboards, and tiles, in a web application or a website. Power BI APIs are available in several programming languages and development frameworks for embedded analytics.
Power BI embedded analytics overview — Power BI
Power BI embedded analytics allows you to embed your Power BI content such as reports, dashboards and tiles, in a web…
Power BI Embedded Analytics Playground: Power BI Embedded Analytics Playground is a web app for developers to learn, explore, and try out Power BI embedded analytics. The playground provides a hands-on coding experience. Developers can embed reports and interact with Power BI client APIs with instant results.
What is the Power BI embedded analytics playground — Power BI
The Power BI embedded analytics playground makes it easy for you to learn, explore, and try out Power BI embedded…
Power BI embedded analytics offers two primary solutions: Embed for your customers and Embed for your organization. The following table provides a comparison between the two.
The following image summarizes the embedding scenarios supported by Power BI.
Embed for your organization (user owns data)
Embedding for your internal users requires users to have a Power BI Pro or PPU license or content hosted on Power BI Premium capacity (P or EM SKUs). In all scenarios, users are authenticated through AAD and must have relevant permissions to the underlying content to view and interact with embedded content.
Embed for Productivity (No-code Embedding): Power BI offers a simple no-code/low-code embedding solution for Microsoft 365 apps and internal websites or portals. Embed for productivity aims to increase employee productivity by bringing reports and data close to employees’ reach. However, embedding a report doesn’t automatically permit users to view the report. Users need to be given view permissions in Power BI.
- Embed in SharePoint Online: Power BI reports can be embedded in a SharePoint Online modern page using the SharePoint Online web part for Power BI. The embedded report is fully interactive and respects all permissions and data security.
- Embed in Teams: Power BI and paginated reports can be embedded in Microsoft Teams channels and chats. Embedding in Teams allows the channel participants and chat to discuss the contents of a report using threaded conversations.
- Embed in Website or Portal (Secure URL Embedding): Power BI service provides secure links and HTML code for iFrame style embedding in internal websites, portals, and SharePoint on-premises. Users are prompted to sign in to Power BI before viewing a page with the embedded report. This authentication approach ensures that all permissions and RLS are enforced before the user sees the embedded content.
Embedding in custom or third-party application: Power BI content can be embedded in internal or third-party applications that allow customizations, e.g., Salesforce. Developers have a range of Power BI APIs available in several programming languages. These applications and portals can be cloud-based or hosted on-premises. The security implications, permissions, and licensing requirements are the same as embedding for productivity.
It’s worth noting that enterprises can embed for external users such as partners, vendors, customers, or suppliers with similar security and licensing requirements as internal users. For example, guest users are authenticated through an entry in the enterprise’s AAD or a B2B or B2C connection. In addition, external users can bring their own Power BI license.
Embed for your customers (app owns data)
Independent Software Vendors (ISVs) and solution providers can embed Power BI content into custom applications used externally by customers and partners. The application user is authenticated and authorized by the application. The users do not need a Power BI license to view and interact with the embedded content.
Embed for your customer is supported by Power BI Embedded (A SKUs). The application connects to the Power BI after authenticating through the AAD based on either a service principal or a master account. There is no option to authenticate the end-users using AAD.
Embed for Public Websites
Publish to Web: Publish to web is a sharing feature that allows organizations to embed a Power BI report on a Web site, blog post, email, or social media site without requiring authentication. The report can also be viewed directly in a browser without any embedding. In addition, it allows users to share the content without restriction, so use it only for non-sensitive data.
Users viewing the report do not require a Power BI license, but the user publishing the report does. Power BI admins can disable the publish to web feature or limit the use to specific groups or individuals.
The following table summarizes the embedded analytics by the back-end platform and licensing.
That’s all about APIs and embedding in Power BI. So take a break and get a coffee!
APIs and embedded analytics extend the usability of Power BI by offering automation and the ability to embed Power BI in line-of-business applications and web pages.
This article examined the APIs and embedding options available in the Power BI ecosystem. We also briefly discussed the various scenarios and licensing requirements for embedded analytics.
Other articles in this series
This article was a part of the article about client applications and interfaces in Power BI. We recommend reading through the following article to complete the knowledge.
Demystifying Power BI — User Applications & Interfaces
A summary and overview of client applications available in the Power BI ecosystem to access Power BI content
In another article, we talked about the data management capabilities of Power BI. We will discuss the types of data models, storage modes, connectivity modes, data cleansing, and refresh options in Power BI.
Demystifying Power BI — Data Management
A summary and overview of data management and supporting components in the Power BI ecosystem
We have another article about report types, report design, and data modeling tools in Power BI.