MikeV
MikeV

Reputation: 51

How Can I build an app to call the Power BI Refresh History?

I am trying to create a simple VS App that will check the refresh history of a Power BI Dataset in a workspace in an organization. Although Microsoft has a ton of stuff on their website and Github, it seems like it always gets me 90% there then I'm a sitting duck and can't get it to work. I'm using the service principle approach to log in and check the refresh history. If the refresh history is after a given threshold, send an email. Most of my monitors are in VS and then I create an exe that I run through a scheduler. Wanted to do the same thing here.

Upvotes: 0

Views: 773

Answers (1)

Ian Felton
Ian Felton

Reputation: 91

I do this via the Power BI REST APIs (https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistoryingroup). Specifically, I use a custom connector in a logic app (instructions for that here: https://youtu.be/2Cgi3s7Zs5M). The same thing could be done in Power Automate. The nice thing is that you can take an action based on the value returned, all running in the cloud (including the email part).

Upvotes: 1

Related Questions