Categories: Power BI

Refresh Power BI Dataset using Logic Apps

A recent blog on the Power BI website announced the availability of a preview component in Microsoft Flow, which allows to easily refresh a specific dataset. This is good news, because in reality Azure Logic Apps are under the hood of Flow, so this means the refresh capability is now also available in Logic Apps. Hoozah.

Double good news, because if you wanted to do this previously, you had to do an elaborate work around using a Logic Apps customer connector which calls the Power BI API. I’ve written about this work around here and here. This doesn’t mean however the custom connector is now totally useless, because there are more than 100 (!) actions of the API which aren’t implemented yet in Logic Apps.

Configuring the new Logic Apps action is easy peasy lemon squeezy. You add the action to the canvas first:

You might have to log into Power BI first. Another advantage of this action is that I can use it with my credentials: a Power BI pro user with admin privileges on the workspace. However, with the custom connector you had to be a Power BI admin (which I’m not in our Power BI tenant).

All there’s left to do is select the workgroup and the dataset from the dropdowns:

With the custom connector, you had to enter the GUIDS of both. Yuk. Definitely an improvement! The only downside is currently the action is asynchronous only which means the action immediately succeeds (as in it could call the Power BI API successfully) but you have no idea if the refresh actually succeeded or failed.


------------------------------------------------
Do you like this blog post? You can thank me by buying me a beer 🙂
Koen Verbeeck

Koen Verbeeck is a Microsoft Business Intelligence consultant at AE, helping clients to get insight in their data. Koen has a comprehensive knowledge of the SQL Server BI stack, with a particular love for Integration Services. He's also a speaker at various conferences.

View Comments

    • Sure. If you have the custom connector, you can for example use the API to fetch the list of all datasets in a workspace. Then you can loop over the results and inside the loop you have the refresh activity.

  • Thank you Koen, very helpful.

    Question, could you elaborate what you mean by "a Power BI pro user with admin privileges on the workspace"? Do I need both Power BI pro license and admin rights on the workspace to use this action?

    Rizal

    • You can refresh a logic app as many times as you want (you pay for it though).
      But a Power BI Dataset itself can only be refreshed 8 times a day in a Pro workspace.
      So if you use a logic app to refresh a Power BI dataset, you'll get an error the 9th time you run the logic app.

Recent Posts

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

I'm hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM UTC.…

5 days ago

dataMinds Connect 2024 – Session Materials

The slides and scripts for my session "Tackling the Gaps & Islands Problem with T-SQL…

4 weeks ago

Connect to Power BI as a Guest User in another Tenant

Sometimes your Microsoft Entra ID account (formerly known as Azure Active Directory) is added as…

2 months ago

How to use a Script Activity in ADF as a Lookup

In Azure Data Factory (ADF, but also Synapse Pipelines and Fabric Pipelines), you have a…

4 months ago

Database Build Error – Incorrect syntax near DISTINCT

I wrote a piece of SQL that had some new T-SQL syntax in it: IS…

4 months ago

Speaking at dataMinds Connect 2024

I'm very excited to announce I've been selected as a speaker for dataMinds Connect 2024,…

5 months ago