Forum Discussion
PowerBI Audit Activity events API - Scheduled RefreshDataset activity
- 1 year ago
Yes. Use GetGroupsAsAdmin to get the workspace then run AddUserAsAdmin for each. Pick you favourite scripting language of choice
Hi ledd_25 ,
Thank you for reaching out to the Microsoft Community Forum.
The Get Activity Events API from Power BI’s Admin REST API returns audit log events for a tenant, but it does not include scheduled refresh events. This is a known limitation.
please refer below for alternative workaround.
1. Use the Get Refresh History API, but it requires access to each workspace. Power BI Service Admin can use the Admin APIs to enumerate all datasets across the tenant using GetDatasetsAsAdmin, then loop through each dataset to call Get Refresh History.
Note: This still requires that the service principal has access to each workspace.
2. Audit logs for Power BI can be captured through the Microsoft 365 Audit Log . This includes scheduled refreshes if audit logging is enabled in the Power BI Admin Portal.
3. When the service principal is not a member, If you want access refresh history for workspaces try the below workaround.
Temporarily assign the service principal to each workspace. Fetch the refresh history and then remove the service principal, this can be automated using the Power BI REST Admin APIs.
Please refer below microsoft official document for your reference.
Admin - Get Activity Events - REST API (Power BI Power BI REST APIs) | Microsoft Learn
If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.
Thank you
Hi ledd_25 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.
Thank you.
- v-dineshya1 year agoCommunity Support
Hi @ledd_25 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Thank you.
- v-dineshya1 year agoCommunity Support
Hi @ledd_25 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Thank you.