Power BI icon

Power BI

Work with the Power BI API

Overview

This node integrates with the Power BI API to perform various operations on Power BI resources. Specifically, for the Gateway resource with the Get Datasources operation, it retrieves the list of datasources associated with a specified Power BI gateway.

This is useful in scenarios where you want to automate monitoring or management of Power BI gateways and their datasources, such as auditing datasource configurations, syncing datasource info with other systems, or triggering workflows based on datasource changes.

Example use case:
You have multiple Power BI gateways deployed across your organization. You want to regularly fetch all datasources configured on a particular gateway to verify connectivity or update documentation automatically.

Properties

Name Meaning
Authentication Method used to authenticate with Power BI API. Options: OAuth2, Bearer Token (API key).
Gateway Name or ID The specific Power BI gateway from which to retrieve datasources. Can be selected from a list or set via expression.

Output

The node outputs an array of JSON objects representing the datasources retrieved from the specified gateway. Each object contains details about a datasource configured on that gateway, such as its name, type, connection details, and other metadata provided by the Power BI API.

If the node supports binary data output (not indicated here), it would typically represent files or attachments related to the datasource, but this operation focuses on JSON metadata only.

Dependencies

  • Requires valid authentication credentials for the Power BI API, either via OAuth2 or a bearer token.
  • The node depends on n8n's internal methods to load available gateways (getGateways) and datasources (getDatasources).
  • Proper configuration of the Power BI API credentials within n8n is necessary.
  • Network access to the Power BI service endpoints.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication tokens will cause authorization errors.
    • Specifying a non-existent or inaccessible gateway ID will result in errors or empty results.
    • Insufficient permissions on the Power BI account to read gateway datasources can cause failures.
  • Error messages:

    • "The resource "gateway" is not supported!" — This indicates an unsupported resource was requested; ensure the resource and operation names are correct.
    • API errors returned from Power BI (e.g., 401 Unauthorized, 404 Not Found) should be checked by verifying credentials and gateway IDs.
    • If the node fails but Continue On Fail is enabled, error details will be included in the output JSON for easier debugging.

Links and References

Discussion