Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PaisleyPrince
Helper III
Helper III

Obtain a list of refresh information programatically

Hi,

Is it possible to obtain the following information across a list of workspaces programatically rather than manually

  1. a list of latest semantic model refresh dates
  2. a note of whether notifications are set up and if so, who they are sent to ? 

thanks

Scott

1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi @PaisleyPrince 

 

Yes, you can programmatically obtain refresh information across multiple workspaces using Power BI REST APIs. Here’s how:

  1. Listing Workspaces and Datasets: Use the Get Groups API to list all workspaces you have access to. For each workspace, use the Get Datasets in Group API to fetch all datasets.
  2. Getting Refresh History: For each dataset, use the Get Refresh History API to retrieve the latest refresh dates, statuses, and timestamp details. This allows you to compile a list of the most recent refreshes for all datasets across your workspaces.
  3. Notifications Setup: Currently, Power BI REST API does not expose details about whether refresh notifications are set up and to whom they are sent. Notification settings are typically managed within the Power BI Service UI, but they are not accessible via API for automation or auditing.
  4. Automating the Process: You can write scripts in PowerShell, Python, or other scripting languages to automate these API calls. Using scheduled runs, you can generate a report of refresh statuses and last refresh times across many workspaces and datasets.

Additional Resources:

While you can't directly pull notification recipient info via API, you can keep track of refresh statuses programmatically and manage notification preferences manually within the Power BI portal.

 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.

💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.

🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.

🔗 Curious to explore more? [Discover here].

Let’s keep building smarter solutions together!

 

View solution in original post

5 REPLIES 5
Poojara_D12
Super User
Super User

Hi @PaisleyPrince 

Yes, it is possible to retrieve this information programmatically using the Power BI REST APIs or PowerShell cmdlets, rather than collecting it manually. Through the Power BI REST API (specifically the Datasets - Get Refresh History and Datasets - Get Datasets In Group endpoints), you can loop through a list of workspace IDs and extract details such as the latest semantic model (dataset) refresh date, status, and duration. This allows you to build an automated inventory of refresh histories across all workspaces. However, Power BI currently does not expose notification recipient details (refresh failure or success emails) directly through the API or PowerShell — these are configured at the dataset level in the Power BI Service UI and stored internally. As a workaround, some administrators maintain notification settings externally (for example, in an Excel or SQL reference table) and align them with datasets via scripts. For enterprise-scale monitoring, organizations typically combine these API outputs with Power BI Activity Logs or Admin APIs (accessible only to Power BI Service Administrators) to capture refresh metadata across all workspaces, and then visualize them in an internal Power BI “Refresh Tracker” report.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
v-tejrama
Community Support
Community Support

Hi @PaisleyPrince ,

 

Thank you @tayloramy  for the response provided!


Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.


Thank you for your understanding!

Hi @PaisleyPrince ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Thank you.

grazitti_sapna
Super User
Super User

Hi @PaisleyPrince 

 

Yes, you can programmatically obtain refresh information across multiple workspaces using Power BI REST APIs. Here’s how:

  1. Listing Workspaces and Datasets: Use the Get Groups API to list all workspaces you have access to. For each workspace, use the Get Datasets in Group API to fetch all datasets.
  2. Getting Refresh History: For each dataset, use the Get Refresh History API to retrieve the latest refresh dates, statuses, and timestamp details. This allows you to compile a list of the most recent refreshes for all datasets across your workspaces.
  3. Notifications Setup: Currently, Power BI REST API does not expose details about whether refresh notifications are set up and to whom they are sent. Notification settings are typically managed within the Power BI Service UI, but they are not accessible via API for automation or auditing.
  4. Automating the Process: You can write scripts in PowerShell, Python, or other scripting languages to automate these API calls. Using scheduled runs, you can generate a report of refresh statuses and last refresh times across many workspaces and datasets.

Additional Resources:

While you can't directly pull notification recipient info via API, you can keep track of refresh statuses programmatically and manage notification preferences manually within the Power BI portal.

 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.

💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.

🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.

🔗 Curious to explore more? [Discover here].

Let’s keep building smarter solutions together!

 

tayloramy
Community Champion
Community Champion

Hi @PaisleyPrince

 

You can get this most of this info fromt he admin REST APIs: 

  • Latest refresh per semantic model (dataset): Iterate workspaces -> datasets -> call Get Refresh History with $top=1 to get the most recent refresh record (status, start/end). Docs: Get Refresh History In Group or Get Refresh History.
  • Is email notification configured for scheduled refresh? Call Get Refresh Schedule and read the notifyOption field (MailOnFailure or NoNotification). Docs: Get Refresh Schedule.
  • Who are the notification recipients? Not exposed by the REST API today. The service supports adding extra recipients in the UI (“Email these contacts when the refresh fails”), but there’s no documented endpoint to read that list. Microsoft’s data-refresh article confirms only that owners get failure notifications by default and others can be added in the UI. Docs: Data refresh in Power BI – notifications.
  • Tenant-wide monitoring: If you need fleet-level oversight, the Admin – Get Refreshables endpoint surfaces refreshable items and attempt info, and Admin – Get Activity Events gives audit events you can pipeline into your own alerting. Docs: Admin – Get Refreshables, Admin – Get Activity Events.

 

There's not a nice single endpoint to get all of this data, but you should be able to piece together GetRefreshHistory and GetRefreshSchedule to figure all of this except for the notification recipents out. 

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors