Implement Power BI Embedding Analytics for better business decision(Part-1)

Garima Shrivastava
ITTStar Technology Blogs
5 min readAug 13, 2021

Introduction:

Business Analytics and Intelligence have become very imperative areas in today’s world, which helps in turning irrelevant data into meaningful information, to make better business decisions and drive increased revenues, customer satisfaction, customer retention, and cost optimization.

Now let’s understand what is embedded analytics?

Embedded Analytics helps businesses to seamlessly integrate powerful BI capabilities directly into their applications, mobile apps, and web portals. Rather than having business analytics separate from the application, embedded analytics enables reports and dashboards to exist natively in the application.

I have divided this blogpost into three parts.

“In this part-1 blogpost, I’ll be explaining how Power BI Embedded Analytics can be implemented into a web Application”.

In Part-2 we’ll be discussing how to implement Power BI Authoring Console, and in Part-3 we’ll be exploring how to implement Azure Active Directory B2C (Azure AD B2C) authentication to your web applications.

Types of Power BI Embedding Analytics:

The embed for your customers solution allows you to build an app that uses non-interactive authentication against Power BI. Your customers are likely to be external users, and they don’t need to sign in using their Power BI credentials to view the embedded content.​

The embed for your organization solution allows you to build an app that requires signing in using Power BI credentials. Once signed in users can only consume embedded content they have access to on Power BI service.​

Benefits of Power BI Embedding Analytics:

Quickly provide operational customer-facing reports and dashboards ​

Total Control of Visuals and User Experience in Authoring Mode​​

Easy to use and Maintain​

Reduce developer resources​

No end-User Licensing Required in ISV Scenario

Step by Step Process for Embedding Power BI Analytics​:

Process flow of Embedding Power BI Analytics:

Web app user authenticates against your web app (with your authentication method).​

Your web app uses a service principal or a master user to authenticate against Azure AD.​

Your web app gets an Azure AD token from Azure AD, and uses it to access Power BI REST APIs. Access to the Power BI REST APIs is given according to your authentication method, which is either service principal or master user.​

Your web app calls an Embed Token REST API operation, requesting the embed token. The embed token specifies which Power BI content can be embedded.​

The REST API returns the embed token to your web app.​

The web app passes the embed token to the user’s web browser.​

The web app user uses the embed token to access Power BI​

Pre-requisites: You need to have a Power BI Pro account with Azure access OR alternatively, a Service principal that uses an application ID and an application secret to authenticate your application.

Step 1: Setup your own Azure AD tenant and register your application in Azure AD (This step is needed for your application to access Power BI REST APIs). The Azure AD app establishes permissions for Power BI REST resources, and allows access to the Power BI REST APIs)

Step 2: Create a new workspace and Publish your Report into this Workspace: You can create your own report using Power BI Desktop, and then publish it to this workspace. Or, you can upload your existing reports to this workspace.

Step 3: Get the embedding parameters: To embed your Power BI contents, you’ll need to obtain certain parameter values like ClientID, WorkspaceID and ReportID, UserName & Password if you are using Master Account.

Step 4: Embed analytics content into your application

We have installed two Virtual Machines in Azure for the frontend and backend Servers.

We Chose Nodejs as coding language and installed the dependencies.

We passed all the required parameters mentioned in step3 in the backend server code.

After this, we have to run the server and it will generate an authentication access token in the given API. The Azure AD Application (Power BI embedding) authenticates against Azure AD with these stored credentials. Then our app will use this token to get access to Power BI reports and dashboards.

This generated API we have to pass in the frontend HTML code.

Now it renders reports/dashboards in the frontend UI which can be seen by anyone in the website.

Embedded Thumbnail of Power BI Reports into Our Company Web Portal:

Telecom Power BI Report:

Summary:

Embedded Power BI allows you to place stunning data visuals, and analytical content directly into your applications. One of the benefit of Embedding Power BI is, it Reduces developer resources by automating the monitoring, management, and deployment of analytics, while getting full control of Power BI features and intelligent analytics. In this blogpost we learnt how we can implement Embedding Power BI Reports/Dashboard into a Web Portal for your Customers.

In my next blogpost we will discuss what is Power BI Authoring and how to implement it in a Web Portal.

Authors:

Garima Shrivastava(Business Analytics Lead)

Soumya Ranjan(Data Engineer/Web Developer)

Manikandan (Data Engineer/Web Developer)

Aswathi (Data Engineer/Reporting Analyst)

Ittstar Consulting LLC

……………………….Thanks for reading this blog……………………….

--

--