Unable to run a script via Power Automate when trying to use refreshAllLinksToLinkedWorkbooks Method in Web Excel

Joe 1 Reputation point
2022-02-20T11:04:17.577+00:00

Issue: I am trying to implement refreshAllLinksToLinkedWorkbooks() method in a script and using Power Automate to run the script I am having the following error

Error

{  
  "message": "We were unable to run the script. Please try again.\nOffice JS error: Line 3: Workbook refreshAllLinksToLinkedWorkbooks: The operation failed because the user has not granted permission to refresh external workbook links.\r\nclientRequestId: 89dc046d-e456-4a68-9af6-bc9f529dcf6c",  
  "logs": []  
}  

The script I have for Excel

function main(workbook: ExcelScript.Workbook) {  
 // Refresh all workbooklinks  
 workbook.refreshAllLinksToLinkedWorkbooks();  
}  

I believe it is related to Web Excel does not have the feature to Enable All Data Types and it keep showing the below notification when I open the Web Excel Spreadsheet

176163-image.png

Where as my Desktop PC have the below settings and no pop-up error

176115-image.png

This looks like a bug. Could Microsoft Dev team advise please?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,882 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dave Patrick 426K Reputation points MVP
    2022-02-20T13:42:39.743+00:00

    Power automate is not currently supported here on Q&A. The product group for Power automate actively monitors questions in dedicated forums here.
    https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  2. Joe 1 Reputation point
    2022-02-23T15:01:22.883+00:00

    Anyone can help? I'm not getting any answers from Power-Automate Community. This seems to be a Web Excel issue!