Skip to main content

Add credentials

  1. Create a new pipeline or open an existing pipeline.
  2. Expand the left side of your screen to view the file browser.
  3. Scroll down and click on a file named io_config.yaml.
  4. Enter the following keys and values under the key named default (you can have multiple profiles, add it under whichever is relevant to you)
Required: Azure subscription ID and Power BI workspace ID. For authentication you can use either Azure AD (service principal) or default credentials.
If AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID are omitted, the client uses DefaultAzureCredential (e.g. Azure CLI login or managed identity). The service principal or user must have access to the Power BI workspace and the Power BI Service API.

Using Python block

  1. Create a new pipeline or open an existing pipeline.
  2. Add a data loader, transformer, or data exporter block.
  3. Select Generic (no template).
  4. Enter this code snippet (note: change the config_profile from default if you have a different profile):

Trigger a dataset refresh

Export data to a Power BI dataset

Check if a dataset exists

Permissions

  • Your Azure AD app or user needs the Power BI Service scope (e.g. https://analysis.windows.net/powerbi/api/.default).
  • The app or user must have access to the specified Power BI workspace and dataset (e.g. Admin, Member, or Contributor on the workspace).