Power BI icon

Power BI

Work with the Power BI API

Overview

The node integrates with the Power BI API to perform various operations on Power BI resources. Specifically, for the Dataset resource with the Refresh operation, it triggers a refresh of a specified dataset within a Power BI workspace (group). This is useful when you want to programmatically update the data in your Power BI reports and dashboards after the underlying data source has changed.

Common scenarios include:

  • Automating dataset refreshes after ETL jobs complete.
  • Triggering dataset updates based on external events or schedules.
  • Integrating dataset refreshes into broader workflows that involve data processing and reporting.

Example: After loading new sales data into a database, use this node to refresh the corresponding Power BI dataset so that reports reflect the latest information.

Properties

Name Meaning
Authentication Method used to authenticate with Power BI API. Options: OAuth2 or Bearer Token.
Group (Workspace) Name or ID The Power BI workspace (group) where the dataset resides. Leave blank to use "My Workspace". Can select from a list or specify an ID via expression.
Dataset Name or ID The identifier of the dataset to refresh. Must be selected from a list or provided as an ID via expression.

Output

The node outputs JSON data representing the result of the refresh request. Typically, this includes status information about the refresh operation initiated on the dataset.

If the node supports binary data output (not indicated here), it would represent any files or attachments returned by the API, but for the Refresh operation, the output is purely JSON indicating success or failure.

Dependencies

  • Requires access to the Power BI REST API.
  • Needs either OAuth2 credentials or a Bearer Token for authentication.
  • The node depends on n8n's internal methods to load available groups (workspaces) and datasets dynamically.
  • Proper permissions on the Power BI service to trigger dataset refreshes are required.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication tokens will cause authorization errors.
    • Specifying an incorrect group or dataset ID will result in not found errors.
    • Insufficient permissions to refresh datasets can cause permission denied errors.
  • Error messages and resolutions:

    • "Unauthorized": Check that the API key or OAuth2 token is valid and has the necessary scopes.
    • "Dataset not found": Verify the dataset ID and workspace ID are correct and accessible.
    • "Refresh failed": Ensure the dataset is configured correctly in Power BI and that the user has refresh rights.

Links and References

Discussion