Microsoft Power BI CLI
The Paradime SDK provides CLI commands to interact with Microsoft Power BI, allowing you to trigger dataset refreshes and list available datasets with real-time monitoring capabilities.
🔑 Azure AD Application Required
You will need an Azure AD application with Power BI API permissions to use these commands. You can create and configure them in your Azure portal. See our docs here.
Configure Power BI API permissions
Add the Dataset.ReadWrite.All
application permission for the Power BI Service.
Refresh Power BI Datasets
Trigger refreshes for one or more Power BI datasets with parallel execution and comprehensive status reporting.
CLI Command
paradime run power-bi-refresh
Options
--dataset-name
Required, TEXT (multiple)
The name of the Power BI dataset(s) you want to refresh. Can specify multiple datasets by repeating the flag.
--client-id
Required, TEXT
Your Azure AD application client ID. Can be set via POWER_BI_CLIENT_ID
environment variable.
--client-secret
Required, TEXT
Your Azure AD application client secret. Can be set via POWER_BI_CLIENT_SECRET
environment variable.
--tenant-id
Required, TEXT
Your Azure AD tenant ID. Can be set via POWER_BI_TENANT_ID
environment variable.
--group-id
Required, TEXT
The Power BI workspace group ID. Can be set via POWER_BI_GROUP_ID
environment variable.
--refresh-request-body-b64
Optional, TEXT
Base64 encoded JSON string for refresh parameters. Can be set via POWER_BI_REFRESH_REQUEST_BODY_B64
environment variable.
Dataset Refresh Examples
Refresh a single dataset
# Using environment variables (recommended)
paradime run power-bi-refresh --dataset-name "Sales Dashboard"
# Or with explicit flags
paradime run power-bi-refresh \
--client-id "your_client_id" \
--client-secret "your_client_secret" \
--tenant-id "your_tenant_id" \
--group-id "your_group_id" \
--dataset-name "Sales Dashboard"
Refresh multiple datasets in parallel
# Using environment variables (recommended)
paradime run power-bi-refresh \
--dataset-name "Sales Dashboard" \
--dataset-name "Marketing Analytics" \
--dataset-name "Financial Reports"
# Or with explicit flags
paradime run power-bi-refresh \
--client-id "your_client_id" \
--client-secret "your_client_secret" \
--tenant-id "your_tenant_id" \
--group-id "your_group_id" \
--dataset-name "Sales Dashboard" \
--dataset-name "Marketing Analytics" \
--dataset-name "Financial Reports"
Refresh with custom parameters
# Refresh with specific partition or table refresh
export POWER_BI_REFRESH_REQUEST_BODY_B64='eyJ0eXBlIjoiZnVsbCIsImNvbW1pdE1vZGUiOiJ0cmFuc2FjdGlvbmFsIiwibWF4UGFyYWxsZWxpc20iOjJ9'
paradime run power-bi-refresh \
--dataset-name "Large Dataset" \
--refresh-request-body-b64 "$POWER_BI_REFRESH_REQUEST_BODY_B64"
Sample Output
Power BI refresh started in group 7a76b78b-0000-4cec-8202-648224ab54e2...
2025-09-11 13:36:50,962 - Refreshing Power BI dataset: 0dfed4be-45fjf-4e83-90d7-497dcbefdc5f
List Power BI Datasets
List all available Power BI datasets in a workspace with their IDs, names, and refresh status.
CLI Command
paradime run power-bi-list-datasets
Options
--client-id
Required, TEXT
Your Azure AD application client ID. Can be set via POWER_BI_CLIENT_ID
environment variable.
--client-secret
Required, TEXT
Your Azure AD application client secret. Can be set via POWER_BI_CLIENT_SECRET
environment variable.
--tenant-id
Required, TEXT
Your Azure AD tenant ID. Can be set via POWER_BI_TENANT_ID
environment variable.
--group-id
Required, TEXT
The Power BI workspace group ID. Can be set via POWER_BI_GROUP_ID
environment variable.
Usage Examples
# List all datasets (using environment variables)
paradime run power-bi-list-datasets
# With explicit credentials
paradime run power-bi-list-datasets \
--client-id "your_client_id" \
--client-secret "your_client_secret" \
--tenant-id "your_tenant_id" \
--group-id "your_group_id"
Sample Output
Power BI refresh started in group 7a76b78b-0000-4cec-8202-648224ab54e2...
2025-09-11 13:36:50,962 - Refreshing Power BI dataset: 0dfed4be-45fjf-4e83-90d7-497dcbefdc5f
Dataset Status Reference
Understanding the refresh capabilities and status indicators:
Refresh States
✅ Refreshable: Dataset can be refreshed programmatically
❌ Not Refreshable: Dataset cannot be refreshed (e.g., streaming datasets, live connections)
Important Notes
Parallel Execution: Multiple datasets refresh simultaneously for efficiency
Authentication: Uses Azure AD service principal authentication
Workspace Permissions: Service principal must have workspace access
Refresh Limits: Subject to Power BI capacity and refresh quotas
Timeout Handling: Individual dataset refreshes timeout after 60 seconds for triggering
Dataset Identification: Use exact dataset names from your Power BI workspace
Environment Variable Reference
POWER_BI_CLIENT_ID
Azure AD application client ID
POWER_BI_CLIENT_SECRET
Azure AD application client secret
POWER_BI_TENANT_ID
Azure AD tenant ID
POWER_BI_GROUP_ID
Power BI workspace group ID
POWER_BI_REFRESH_REQUEST_BODY_B64
Base64 encoded refresh parameters (optional)
Troubleshooting
Workflow Integration
These Microsoft Power BI CLI commands are designed to integrate seamlessly into your data pipeline workflows. Common use cases include:
Post-dbt Refresh: Trigger Microsoft Power BI refreshes after dbt model runs complete
Scheduled Data Updates: Automate regular refresh cycles for critical dashboards
CI/CD Integration: Include Microsoft Power BI refreshes in your deployment pipelines
Resource Discovery: Use list commands to programmatically discover available workbooks and data sources
For more information about integrating Tableau refreshes into your Paradime workflows, see the Bolt Schedules documentation.
Last updated
Was this helpful?