A Guide to Integrating Power BI into Custom Web Apps
Unlock the full potential of your reports by embedding Power BI into custom applications using REST APIs and the Power BI JavaScript SDK
Embedding Power BI reports into your custom applications enables scalable analytics, seamless UX, and granular access control. This guide provides a quick, step-by-step approach to integrate Power BI into your custom web applications.
🔧 Prerequisites#
Before you start:
- Entra ID Tenant with an Office 365 subscription that includes Power BI.
- Access to the Power BI Service with appropriate permissions.
- Familiarity with Power BI REST API and basic web development.
1️⃣ Sign up for Power BI#
To get started, sign up for Power BI and create a workspace:
- Go to Power BI Service
- Create a new workspace and publish your report.
- See the Power BI documentation for detailed steps.
2️⃣ Generate an Embed Token#
Call the Generate Embed Token API to get a scoped token for embedding. Click on the Try It button to send a request with the required parameters.
Sample Request Body:#
{
"datasets": [
{
"id": "f58a8e51-6fb3-42f9-9ef4-13eab3f5423d"
}
],
"reports": [
{
"allowEdit": true,
"id": "e846455c-9489-44d7-ac16-e9d28ae09b01"
}
]
}
3️⃣ Retrieve Embed URL#
Use the Get Report API to get your report metadata, including the embedUrl. Click on the Try It button to send a request.
- Required parameter:
reportId
4️⃣ Run the Demo App#
To see everything in action:
📦 Clone the Repo:#
git clone https://github.com/ndamulelonemakh/power-bi-embed-2025-demo
cd power-bi-embed-2025-demo
pnpm install
pnpm dev
This demo includes environment setup, token integration, and Power BI rendering via the SDK.
✅ Conclusion#
Power BI Embedded enables powerful data experiences inside your apps, with enterprise-level security, interactivity, and flexibility. With these steps, your team can deliver customized analytics experiences beyond the Power BI portal.