> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bondata.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Power BI

> Connect BonData to Microsoft Power BI for workspaces, datasets, reports, and dataset rows

Microsoft Power BI is a business analytics platform for building interactive reports and dashboards on top of governed semantic models. With BonData, you can connect to your Power BI tenant to read workspace metadata and query dataset rows within Agent workflows.

## Power BI Azure AD OAuth 2.0 Setup

Follow these steps to register an app in Microsoft Entra ID (Azure AD) and authorize it against the Power BI REST API.

### Step 1: Register an App in Entra ID

1. Go to the [Azure Portal](https://portal.azure.com/) and open **Microsoft Entra ID** (formerly Azure Active Directory)
2. Navigate to **App registrations** → **New registration**
3. Configure:
   * **Name**: `BonData Integration`
   * **Supported account types**: Accounts in this organizational directory only
   * **Redirect URI**: Web - `https://app.bondata.ai/auth/oauth2/callback`
4. Click **Register**
5. On the **Overview** page, copy the **Application (client) ID** and **Directory (tenant) ID**

### Step 2: Grant Power BI Service API Permissions

1. Go to **API permissions** → **Add a permission**
2. Select **Power BI Service**
3. Choose **Delegated permissions** and add `Tenant.Read.All`, `Dataset.Read.All`, `Report.Read.All`, and `Workspace.Read.All`
4. Click **Add permissions**, then **Grant admin consent** (requires a tenant administrator)

<Note>
  To read dataset table rows over the XMLA endpoint, an administrator must enable **XMLA endpoint** read access in the Power BI Admin portal under **Tenant settings** → **Integration settings**. This requires a Premium or Fabric capacity.
</Note>

### Step 3: Create a Client Secret

1. Go to **Certificates & secrets** → **Client secrets**
2. Click **New client secret**, add a description, and select an expiration
3. **Copy the secret value immediately** - it is only shown once

### Step 4: Enter Credentials in BonData

1. In BonData, navigate to **Integrations** and select **Power BI**
2. Enter your **Tenant ID**, **Client ID**, and **Client Secret**
3. Click **Connect**

## Required Fields

| Field         | Description                                                |
| ------------- | ---------------------------------------------------------- |
| Tenant ID     | Directory (tenant) ID from the Entra ID app registration   |
| Client ID     | Application (client) ID from the Entra ID app registration |
| Client Secret | Client secret value created under Certificates & secrets   |

## Available Data

Once connected, BonData can sync the following Power BI data via the Power BI REST API and XMLA endpoint:

* **Workspaces** - Workspace (group) metadata including capacity assignment and access
* **Datasets** - Semantic models with configured tables, refresh schedules, and data sources
* **Reports** - Report definitions and their associated datasets
* **Dashboards** - Dashboards and their pinned tiles
* **Dataflows** - Dataflow definitions and entity metadata
* **Dataset Table Rows** - Row-level data queried from dataset tables via the XMLA endpoint
