# Dataset Refresh Completed — Microsoft Power BI

> Emit new event when a dataset refresh operation has completed. See the documentation

- Key: `microsoft_power_bi-dataset-refresh-completed`
- Type: Trigger (Polling)
- Version: 0.0.7
- 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/triggers/dataset-refresh-completed
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/microsoft_power_bi/sources/dataset-refresh-completed/dataset-refresh-completed.mjs

## Description

Emit new event when a dataset refresh operation has completed. [See the documentation](https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-history)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `datasetId` | `string` | No | Select a Dataset or provide a custom Dataset ID. Options are loaded from the connected account. |
| `customDatasetId` | `string` | No | You may enter a Dataset ID directly. Either Dataset ID or Custom Dataset ID must be entered. |
| `timer` | `$.interface.timer` | Yes | Timer |

## Returns

Events emitted by Microsoft Power BI.

## Run it

**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 deployed = await pd.triggers.deploy({
  id: "microsoft_power_bi-dataset-refresh-completed",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    microsoft_power_bi: { authProvisionId: "apn_xxxxxxx" },
    datasetId: "Dataset ID",
    customDatasetId: "Custom Dataset ID",
  },
  webhookUrl: "https://example.com/webhooks/microsoft-power-bi",
})

console.log(deployed.id)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/triggers/deploy \
  -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-dataset-refresh-completed",
    "webhook_url": "https://example.com/webhooks/microsoft-power-bi",
    "configured_props": {
      "microsoft_power_bi": { "authProvisionId": "apn_xxxxxxx" },
      "datasetId": "Dataset ID",
      "customDatasetId": "Custom Dataset ID"
    }
  }'
```

**MCP**

MCP servers expose Microsoft Power BI actions as on-demand tools.

Dataset Refresh Completed is an event source, so your application deploys it with the Connect SDK or API and then either receives each event at a webhook URL or retrieves events on demand with the trigger events API.

## Event delivery

Every event is sent to the HTTP endpoint you choose when you deploy the source. Or: no webhook required — your app or agent can fetch recent events from the [trigger events API](https://pipedream.com/docs/connect/api-reference/list-trigger-events.md) instead.

---

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