OfficeDev / OfficeDev/office-scripts-docs

Office Scripts: workbook.refreshAllDataConnections() no longer refreshes Power BI Semantic Model live connections in Excel Online

Open
#832 2 comments 0 reactions 1 assignee View on GitHub

@alison-mk is already working on this.

Since Aug 17, 2026.

Status: under investigation Type: product bug
Dominant language
No language data
Stars
235
Forks
68
Avg merge
6d 7h
Merged PRs (30d)
2

Description

Summary

The Office Scripts method workbook.refreshAllDataConnections() no longer refreshes a live connection to a Power BI Semantic Model in Excel Online.

Environment
  • Excel Online
  • Office Scripts
  • Power Automate ("Recurrence" + "Run Office Script")
  • Live connection to a Power BI Semantic Model (Analyze in Excel)
Expected behavior

Calling

workbook.refreshAllDataConnections();

should trigger the same refresh as manually selecting Data → Refresh All in Excel Online.

Actual behavior

The script completes successfully without any error, but the workbook does not requery the Power BI Semantic Model.

Additional observations
  • The same workbook worked correctly for approximately two years.
  • The issue started around mid-July 2026.
  • Manual Data → Refresh All in Excel Online refreshes successfully.
  • Refreshing in Excel Desktop also works correctly.
  • The problem occurs both:
    • when running the Office Script manually from the Automate tab in Excel Online
    • when running the same Office Script from Power Automate ("Run Office Script")

This suggests the issue is specific to the Office Scripts implementation of refreshAllDataConnections() rather than the workbook, authentication, or the Power BI connection itself.

Steps to reproduce
  1. Create an Excel workbook with a live connection to a Power BI Semantic Model.
  2. Confirm that manual Data → Refresh All refreshes the data successfully.
  3. Create an Office Script containing only:
function main(workbook: ExcelScript.Workbook) {
	// Refresh all data connections
	workbook.refreshAllDataConnections();
}
  1. Run the script.
Result

The script finishes successfully but no refresh is performed.

Expected result

The workbook should requery the Power BI Semantic Model exactly as when using the manual Refresh All button in Excel Online.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.