# Get Report by id — Microsoft Power BI

> Retrieve metadata for a single Power BI report by ID. Uses My workspace by default; set Workspace (Group) ID for a specific workspace. See the documentation

- Key: `microsoft_power_bi-get-reports-by-id`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Microsoft Power BI (`microsoft_power_bi`) — https://pipedream.com/apps/microsoft-power-bi.md
- This page (HTML): https://pipedream.com/apps/microsoft-power-bi/actions/get-reports-by-id
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/microsoft_power_bi/actions/get-reports-by-id/get-reports-by-id.mjs

## Description

Retrieve metadata for a single Power BI report by ID. Uses My workspace by default; set Workspace (Group) ID for a specific workspace. [See the documentation](https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-report)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `groupId` | `string` | No | Workspace group ID (GUID), e.g. f089354e-8366-4e18-aea3-4cb4a3a50b48. Omit to target My workspace. Options are loaded from the connected account. |
| `reportId` | `string` | Yes | Power BI report ID (GUID), e.g. 2f1f6a59-1b2c-4d84-9d89-4c27f8a3c111. Set Workspace (Group) ID to scope options to one workspace. Options are loaded from the connected account. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "microsoft_power_bi",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "microsoft_power_bi-get-reports-by-id",
  arguments: {
    groupId: "Workspace (Group) ID",
    reportId: "Report ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "microsoft_power_bi-get-reports-by-id",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    microsoft_power_bi: { authProvisionId: "apn_xxxxxxx" },
    groupId: "Workspace (Group) ID",
    reportId: "Report ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "microsoft_power_bi-get-reports-by-id",
    "configured_props": {
      "microsoft_power_bi": { "authProvisionId": "apn_xxxxxxx" },
      "groupId": "Workspace (Group) ID",
      "reportId": "Report ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/microsoft-power-bi.md · All apps: https://pipedream.com/apps
