ahoy
MAY 9, 2025

The Power BI Refresh Kit can refresh datasets through Rivery action and logic rivers using Power BI’s REST API. Instead of scheduling datasets to be refreshed at intervals, this kit can be scheduled to run and refresh datasets immediately after a river such as a dbt Build action river. In this way, you can seamlessly add the latest and greatest data to your front-end dashboards, while minimizing your data warehouse compute costs.

Documentation on Microsoft’s Power BI REST API can be found here.

This kit includes

Three action rivers to refresh the data:

  • Sign in/Retrieve API Token
  • Get Workspace Dataset ID(s)
  • Refresh Datasources
  • Master logic river that orchestrates these actions to refresh the selected data sources

 

Minimum RPU Consumption: 1

Configuring this kit for use

Connections

There are 6 keys that need to be added when creating the Power BI connection. See the screenshot below for an example of how the Power BI connection screen should look. The Client ID and Client Secret have to correspond to a registered application in Microsoft Entra ID (formerly Azure Active Directory). This kit uses a service principal as the registered application to create a Power BI connection. More information on how to create a service principal can be found here.

 

  • {client_id} – This is your service principal’s Client ID for Power BI’s API.
  • {client_secret} – This is your service principal’s Client Secret for Power BI’s API.
  • {tenant_id} – This is the ID associated with your organization’s Microsoft Entra ID instance. To find your Tenant ID, you can sign into the Azure portal and navigate to Microsoft Entra ID to see it in the Basic information section. More information on how to find your tenant ID can be found here
  • {group_id} – This is the ID associated with your Power BI workspace. To find your Group ID, you can go to your assigned workspace within Power BI and find the ID as part of the URL which is after /groups/. More information on how to find your Group ID can be found here.
  • {grant_type} – The Grant Type specifies the authentication method. This kit uses the “client_credentials” value to authenticate using the Client ID and Client Secret. This key is hardcoded into the request body for convenience.
  • {scope} – The Scope specifies the permissions the service principal is requesting for. The value “https://analysis.windows.net/powerbi/api/.default” is used to request for all permissions that have been granted to the service principal. This key is hardcoded into the request body for convenience.

 

Directions

The intended purpose is to refresh the data sources within Power BI where the underlying data models have been updated through rivers, essentially creating a trigger-based data refresh cadence. The easiest way to do this is to add the master logic river to the end of another logic river that updates data models. This way, after the river executes, it will refresh both the data target alongside its dataset connection in Power BI to keep your dashboards and reports as up to date as possible.

 

This Kit is configured to refresh all data sources for a given Power BI workspace. If there is a need to only update specific data sources, then the “Get Workspace Dataset ID(s)” action river may be excluded and specific dataset ID’s may be input into the “Refresh Datasources” action river. 

Consult with us

Lets us show you why the world's top brands choose Rivery.
icon icon