What can you do with it?

Microsoft Power BI allows you to manage business intelligence assets programmatically. You can access workspaces, create and clone reports, manage dashboards, refresh datasets, export reports in various formats, embed reports with secure tokens, monitor data sources and gateways, and organize analytics content. This integration is perfect for automated reporting, data visualization management, and business intelligence workflows.

How to use it?

Basic Command Structure

/your-Microsoft-Power-BI-connection [action] [required-parameters] [optional-parameters]

Parameters

Required:

  • action - The operation to perform with Power BI

Tools

List Workspaces

Get all workspaces you have access to

Parameters:

  • None required

Example:

/your-Microsoft-Power-BI-connection
action: list-workspaces

Response:

{
  "value": [
    {
      "id": "3d9b93c6-7b6d-4801-a491-1738910904fd",
      "name": "Marketing Analytics",
      "isReadOnly": false,
      "isOnDedicatedCapacity": true,
      "type": "Workspace"
    }
  ]
}

List Reports

Get all reports in a specific workspace

Parameters:

  • workspace-id (required) - The ID of the workspace

Example:

/your-Microsoft-Power-BI-connection
action: list-reports
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd

Response:

{
  "value": [
    {
      "id": "5b218778-e7a5-4d73-8187-f10824fb3d0f",
      "name": "Quarterly Performance",
      "webUrl": "https://app.powerbi.com/groups/3d9b93c6-7b6d-4801-a491-1738910904fd/reports/5b218778-e7a5-4d73-8187-f10824fb3d0f",
      "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229"
    }
  ]
}

List Dashboards

Get all dashboards in a workspace

Parameters:

  • workspace-id (required) - The ID of the workspace

Example:

/your-Microsoft-Power-BI-connection
action: list-dashboards
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd

Response:

{
  "value": [
    {
      "id": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af",
      "displayName": "Executive Overview",
      "embedUrl": "https://app.powerbi.com/dashboardEmbed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af",
      "isReadOnly": false
    }
  ]
}

Get Report Details

Retrieve detailed information about a specific report

Parameters:

  • workspace-id (required) - The ID of the workspace
  • report-id (required) - The ID of the report

Example:

/your-Microsoft-Power-BI-connection
action: get-report-details
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd
report-id: 5b218778-e7a5-4d73-8187-f10824fb3d0f

Response:

{
  "id": "5b218778-e7a5-4d73-8187-f10824fb3d0f",
  "name": "Quarterly Performance",
  "webUrl": "https://app.powerbi.com/groups/3d9b93c6-7b6d-4801-a491-1738910904fd/reports/5b218778-e7a5-4d73-8187-f10824fb3d0f",
  "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
  "createdDateTime": "2024-10-15T14:30:45.123Z",
  "modifiedDateTime": "2025-02-20T09:12:33.456Z"
}

Refresh Dataset

Trigger a refresh operation for a dataset

Parameters:

  • workspace-id (required) - The ID of the workspace
  • dataset-id (required) - The ID of the dataset

Example:

/your-Microsoft-Power-BI-connection
action: refresh-dataset
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd
dataset-id: cfafbeb1-8037-4d0c-896e-a46fb27ff229

Response:

{
  "requestId": "bf17ac4e-93e3-4e8c-a2e6-5f8fc833e1bc",
  "status": "Accepted",
  "message": "Dataset refresh operation has been accepted and is in progress."
}

Get Refresh History

View the refresh history for a dataset

Parameters:

  • workspace-id (required) - The ID of the workspace
  • dataset-id (required) - The ID of the dataset

Example:

/your-Microsoft-Power-BI-connection
action: get-refresh-history
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd
dataset-id: cfafbeb1-8037-4d0c-896e-a46fb27ff229

Response:

{
  "value": [
    {
      "requestId": "bf17ac4e-93e3-4e8c-a2e6-5f8fc833e1bc",
      "refreshType": "Manual",
      "startTime": "2025-03-09T08:30:45.123Z",
      "endTime": "2025-03-09T08:32:15.456Z",
      "status": "Completed"
    }
  ]
}

Clone Report

Create a copy of an existing report

Parameters:

  • workspace-id (required) - The ID of the source workspace
  • report-id (required) - The ID of the report to clone
  • new-name (required) - Name for the cloned report
  • target-workspace-id (optional) - Destination workspace ID
  • target-dataset-id (optional) - Different dataset to use

Example:

/your-Microsoft-Power-BI-connection
action: clone-report
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd
report-id: 5b218778-e7a5-4d73-8187-f10824fb3d0f
new-name: Quarterly Performance - Marketing Copy
target-workspace-id: 9f41b6a8-0241-4301-9731-0dca082b0c0e

Response:

{
  "id": "7c4aacc9-4e9b-48ab-9c12-3df24ca98765",
  "name": "Quarterly Performance - Marketing Copy",
  "webUrl": "https://app.powerbi.com/groups/9f41b6a8-0241-4301-9731-0dca082b0c0e/reports/7c4aacc9-4e9b-48ab-9c12-3df24ca98765"
}

Export Report

Export a report to PDF or PowerPoint

Parameters:

  • workspace-id (required) - The ID of the workspace
  • report-id (required) - The ID of the report
  • format (required) - Export format: PDF or PPTX

Example:

/your-Microsoft-Power-BI-connection
action: export-report
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd
report-id: 5b218778-e7a5-4d73-8187-f10824fb3d0f
format: PDF

Response:

{
  "file": "binary-file-data",
  "message": "Report exported successfully.",
  "filename": "Quarterly Performance.pdf"
}

Generate Embed Token

Generate a secure token for embedding reports

Parameters:

  • workspace-id (required) - The ID of the workspace
  • report-id (required) - The ID of the report
  • access-level (optional) - Access level: View or Edit (default: View)
  • allow-save-as (optional) - Allow saving copies (default: false)

Example:

/your-Microsoft-Power-BI-connection
action: generate-embed-token
workspace-id: 3d9b93c6-7b6d-4801-a491-1738910904fd
report-id: 5b218778-e7a5-4d73-8187-f10824fb3d0f
access-level: View

Response:

{
  "token": "H4sIAAAAAAAEAB2Ux6K7CBKE3z...",
  "tokenId": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
  "expiration": "2025-03-10T12:30:45Z"
}

Create Workspace

Create a new Power BI workspace

Parameters:

  • name (required) - Name for the new workspace

Example:

/your-Microsoft-Power-BI-connection
action: create-workspace
name: Financial Analytics 2025

Response:

{
  "id": "a1c3e5g7-i9k1-m3o5-q7s9-u1w3y5z7b9d1",
  "name": "Financial Analytics 2025",
  "isReadOnly": false,
  "type": "Workspace"
}

Notes

Power BI workspaces organize reports, dashboards, and datasets. Dataset refresh operations are asynchronous and return a request ID for tracking. Export formats include PDF and PPTX (PowerPoint). Embed tokens expire and must be regenerated periodically. Dedicated capacity provides enhanced performance for workspaces. Gateway status should be checked when working with on-premises data sources.