Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
md 72 lines 5.75 KB
Rendered Raw
1 ## How do I set up custom OAuth credentials for Microsoft Power BI?
2
3 Microsoft Power BI has no Composio-managed app, so you need your own Microsoft Entra ID app registration to connect it.
4
5 ### Create the Microsoft Entra app
6
7 1. Sign in to the [Azure portal](https://portal.azure.com/), open **App registrations**, and click **New registration**.
8 2. Enter a **Name**. Under **Supported account types**, choose an organizational option: **Accounts in this organizational directory only** (single tenant) or **Accounts in any organizational directory** (multitenant).
9 3. Under **Redirect URI**, select the **Web** platform, enter `https://backend.composio.dev/api/v1/auth-apps/add`, and click **Register**.
10 4. On the app's **Overview** page, copy the **Application (client) ID**.
11
12 ![Entra app Overview page with the client, object and tenant IDs censored](/images/toolkits/shared/XrRJcE8kllnTRDHzOTTTl8s9oxc.webp)
13
14 5. Open **Certificates & secrets** and click **New client secret**. Add a description, choose an expiry that fits your rotation policy (for example, 180 days), and click **Add**. Rotate the secret before it expires.
15
16 ![Add a client secret panel with a description and the 180-day expiry](/images/toolkits/shared/eZiGGdUoPbOHKz4sCPqGdS04k.webp)
17
18 6. Copy the secret **Value** right away. Use the **Value**, not the **Secret ID**. Azure shows the full value only once; if you lose it, create a new secret.
19
20 ![Client secrets list with the Value and Secret ID columns censored](/images/toolkits/shared/hiQJlSSKAljLV6UM2Wu8e5sUCzU.webp)
21
22 7. Open **API permissions**, click **Add a permission**, select **Power BI Service**, and choose **Delegated permissions**. Add `Dataset.Read.All`, `Report.Read.All`, `Dashboard.Read.All`, `Workspace.Read.All`, `Content.Create`, and `Dataflow.Read.All`, or only the subset your workflow uses. Click **Add permissions**.
23
24 ![API permissions page with the Add a permission button](/images/toolkits/shared/O3hvEI521MXY1DbagDCQ8U3W2vo.webp)
25
26 ![Request API permissions panel with Power BI Service under Microsoft APIs](/images/toolkits/microsoft_power_bi/power-bi-service-api.webp)
27
28 ![Power BI Service delegated permissions with Workspace.Read.All selected](/images/toolkits/microsoft_power_bi/workspace-read-all-permission.webp)
29
30 ![Configured permissions list on the app's API permissions page](/images/toolkits/microsoft_power_bi/configured-permissions.webp)
31
32 8. If your tenant restricts user consent, have a tenant admin click **Grant admin consent for** your tenant on the **API permissions** page. Adding a permission to the app registration doesn't grant consent by itself.
33
34 The redirect URI you register must exactly match the `oauth_redirect_uri` field in your Composio auth config (default `https://backend.composio.dev/api/v1/auth-apps/add`).
35
36 ![Entra Authentication page listing the Composio Web redirect URI](/images/toolkits/microsoft_power_bi/registered-redirect-uri.webp)
37
38 ### Create the auth config in Composio
39
40 1. In the Composio dashboard, go to **Auth Configs**, click **Create**, and select **Microsoft Power BI**. Enter a config name and click **Next**.
41
42 ![Composio Auth Configs page with the Create button](/images/toolkits/microsoft_power_bi/composio-auth-configs.webp)
43
44 ![Create Auth Config dialog with Microsoft Power BI selected](/images/toolkits/microsoft_power_bi/composio-toolkit-picker.webp)
45
46 ![Auth config name field with the Next button](/images/toolkits/microsoft_power_bi/composio-config-name.webp)
47
48 2. Select **OAuth 2.0** and **Your Own Credentials**. Paste the Application (client) ID into **Client id** and the secret value into **Client secret**. Leave **Redirect URI** as shown.
49
50 ![Composio OAuth 2.0 form with empty Client id and Client secret fields and the v1 redirect URI](/images/toolkits/microsoft_power_bi/composio-oauth-credentials.webp)
51
52 3. Under **Scopes**, select the same permissions you added in Azure, then click **Create Auth Config**.
53
54 ![Composio auth config with the v1 redirect URI and the Workspace.Read.All and offline_access scopes](/images/toolkits/microsoft_power_bi/composio-scopes.webp)
55
56 4. Open the auth config and click **Connect Account**. Sign in with the work or school account you use for Power BI; its license and workspace access still apply. Review the consent prompt and click **Accept**. Leave **Consent on behalf of your organization** unchecked unless you're an admin granting tenant-wide consent. An **unverified** label is expected for a custom app without a verified publisher.
57
58 ![Microsoft Power BI auth config panel with the Connect Account button](/images/toolkits/microsoft_power_bi/composio-connect-account.webp)
59
60 ![Microsoft Pick an account page with the accounts censored](/images/toolkits/shared/1dBnBBEYr17c671yWVLvqnS4k.webp)
61
62 ![Microsoft consent prompt to view all workspaces with organization consent unchecked](/images/toolkits/microsoft_power_bi/microsoft-consent.webp)
63
64 5. Back on the auth config's **Connected Accounts** tab, confirm the account shows **Active**. The **Enabled** label at the top of the page describes the auth config, not the account.
65
66 ![Connected Accounts tab with the Power BI account showing Active](/images/toolkits/microsoft_power_bi/connected-account-active.webp)
67
68 For the general flow, see [custom auth configs](/docs/auth-configuration/custom-auth-configs).
69
70 ### Scopes
71
72 The default auth config requests the Power BI scopes `Dataset.Read.All`, `Report.Read.All`, `Dashboard.Read.All`, `Workspace.Read.All`, `Content.Create`, and `Dataflow.Read.All`, each prefixed with `https://analysis.windows.net/powerbi/api/` (for example, `https://analysis.windows.net/powerbi/api/Workspace.Read.All`), plus `offline_access`. Listing workspaces needs only `Workspace.Read.All`. See Microsoft's [get groups](https://learn.microsoft.com/en-us/rest/api/power-bi/groups/get-groups) reference.