Forum Discussion
Automate table-by-table refresh (in order) in a Premium Workspace — Pro user, looking for non-manual
- 1 year ago
Hi paulos
You could use Power Automate or a Fabric Notebook to refresh each table in the order you want. You can specificy the table name that you want to refresh, then monitor the refresh of the table and only once that has completed would you then move into the next table.
Here is an example how to do this using Power Automate: Leveraging the Advanced Refresh API using Power Automate - minceddata - Obsidian Publish
To do it in more detail with the monitoring you need would be a consultant who can do this work for you.
Hi paulos
You're aiming to automate the sequential refresh of around 28 specific tables within a Power BI dataset that's hosted in a Premium Capacity workspace, although your users only have Power BI Pro licenses. While you've explored several paths—including scripting with Tabular Editor 2 and 3, using XMLA endpoint access, and trying Microsoft's semantic-link Python library (formerly sempy)—each approach has run into roadblocks due to limitations in permissions, unsupported commands in import mode, or incomplete token-based authentication when not running in a Fabric or Notebook environment.
To clarify the core issue: although Premium Capacity workspaces allow XMLA read/write access, most Pro-licensed users can't take full advantage of XMLA write operations like RequestRefresh() or Model.SaveChanges() outside the supported tooling or automation contexts. Power BI Desktop doesn't expose the refresh-by-table functionality for scripting, and Tabular Editor 2 lacks the necessary TOM support in import models unless the dataset is opened in a way that grants elevated metadata control. Even Tabular Editor 3, while more powerful, is limited by service-enforced security boundaries.
Unfortunately, there's currently no fully supported method under Pro licensing to automate individual table refreshes in a published dataset using only XMLA or scripting without leveraging Fabric Notebooks or the enhanced token environments they provide. Your options are likely narrowed to:
Using Power BI REST API to trigger full or partial dataset refreshes — though it cannot refresh individual tables directly. You can use Enhanced Refresh (in Premium) if you can generate a valid access token and scope the refresh to partitions (but this typically requires a service principal or Azure AD app with workspace access).
Deploying a service principal with service account access and running enhanced-refresh REST API calls, which can support per-table or per-partition refresh in Premium (not in shared capacity). This requires setting up an Azure AD app and registering it with tenant-wide admin consent.
Using Tabular Editor 3 or TOM scripts in a fully supported context (e.g., through Azure Automation or a local VM with elevated access and correct token flow), which still requires a Premium workspace and write access via service principal or a user with appropriate rights.
In conclusion, while you're close with your current approaches, the missing piece is authenticated, token-based access through a supported automation context (like Azure Functions or Fabric Notebooks). You might consider raising a request with your Power BI administrator to enable service principal authentication and enhanced refresh support, which will allow you to use the REST API or TOM-based tools to control refreshes at the table/partition level as you intended.