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

# Microsoft Power BI (Client Credentials)

> Integrate your application with the Microsoft Power BI API using a service principal (client credentials)

## 🚀 Quickstart

Connect to Microsoft Power BI with Nango and see data flow in 2 minutes.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Microsoft Power BI (Client Credentials)*.

**2. Connect Microsoft Power BI**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Connect*, then enter your **Tenant ID**, **Client ID**, and **Client Secret**. Later, you'll let your users do the same directly from your app.

**3. Call the Microsoft Power BI API**

Let's make your first request to the Power BI API (list the workspaces your service principal can access). Replace the placeholders below with your [API key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/v1.0/myorg/groups" \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>"
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.get({
>     endpoint: '/v1.0/myorg/groups',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>'
> });
>
> console.log(res.data);
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To obtain your own credentials, follow the setup guide linked below.

## 📚 Microsoft Power BI (Client Credentials) integration guides

Nango-maintained guides for common use cases.

* [How do I link my account?](https://nango.dev/docs/api-integrations/microsoft-power-bi-oauth2-cc/connect)
  Connect using an Entra ID app registered as a Power BI service principal

Official docs: [Power BI REST API](https://learn.microsoft.com/en-us/rest/api/power-bi/)

## 🧩 Pre-built syncs & tools for Microsoft Power BI (Client Credentials)

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type |
| - | - | - |
| `add-dataset-rows` | Append rows of data to a push-dataset table. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `add-workspace-user` | Grant a user or service principal access to a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-dashboard` | Create a new, empty dashboard in a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-push-dataset` | Create a new dataset with an explicit table/column schema in push mode, ready to receive rows via the API without needing a .pbix file. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-workspace` | Create a new Power BI workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-dataset-rows` | Delete all rows from a push-dataset table (truncate) | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-dataset` | Delete a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-workspace` | Delete a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `execute-dataset-queries` | Run a DAX query against a dataset and return the results | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-dataset-refresh-schedule` | Get the configured refresh schedule for a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-dataset` | Get details of a single dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-workspace` | Get details of a single workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-dashboard-tiles` | List the tiles on a dashboard. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-dashboards` | List dashboards in a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-dataflows` | List dataflows in a workspace | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-dataset-datasources` | List the data sources backing a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-dataset-refresh-history` | List the refresh history of a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-dataset-users` | List users and service principals with direct access to a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-datasets` | List datasets in a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-gateways` | List on-premises data gateways visible to this service principal. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-reports` | List reports in a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workspace-users` | List users and service principals with access to a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workspaces` | List Power BI workspaces (groups) accessible to this service principal. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `refresh-dataset` | Trigger a refresh of a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `takeover-dataset` | Transfer ownership of a dataset's data source credentials to the caller. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-dataset-refresh-schedule` | Configure the automatic refresh schedule for a dataset. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-dataset-table-schema` | Replace a push dataset table's column schema. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-workspace` | Rename a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `datasets` | Sync datasets across all workspaces accessible to this service principal. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `workspaces` | Sync Power BI workspaces (groups) accessible to this service principal. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

## API gotchas

* Power BI's app-only auth isn't gated by Microsoft Graph permissions alone — a Power BI tenant admin must also enable **Allow service principals to use Power BI APIs** (and, if scoping to a security group, add the app to that group) in the Fabric admin portal's tenant settings. Without this, requests fail even with a valid token and correct application permissions.
* A service principal only sees workspaces it's been added to as a viewer, contributor, member, or admin (`/v1.0/myorg/groups`). To read tenant-wide without per-workspace membership, use the [Admin API](https://learn.microsoft.com/en-us/rest/api/power-bi/admin) (`/v1.0/myorg/admin/groups`) — this requires enabling **Service principals can access read-only admin APIs** in the Fabric admin portal (separate from the base tenant setting above). No Microsoft Entra API permission is needed: `Tenant.Read.All`/`Tenant.ReadWrite.All` are delegated-only scopes and don't apply to service principals.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.