OfficeDev / script-lab

Create, run and share your code directly from Office
MIT License
703 stars 161 forks source link

Getting Access Denied when registering Custom Functions #1039

Open rsmith0906 opened 10 months ago

rsmith0906 commented 10 months ago

Bug Report

Behavior:

Currently I'm running Script Lab locally at localhost:3000 and if I follow the steps to run it from the Public Add-in Store instance of Script Lab and redirect it to use localhost:3000 I can Register Custom functions.

I installed a Dev Instance of the Add-in that is sideloaded and when I use the localhost:3000 instance of the add-in it errors with Access Denied when I try to register a custom function. This was working yesterday and now its now working today. Has something changed within the last day?

Failure Logs:

Error: { "stack": "RichApi.Error: You cannot perform the requested operation.\n at new n (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:264654)\n at o.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:329270)\n at https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:327332", "message": "You cannot perform the requested operation.", "name": "RichApi.Error", "code": "AccessDenied", "traceMessages": [], "innerError": null, "debugInfo": { "code": "AccessDenied", "message": "You cannot perform the requested operation.", "errorLocation": "CustomFunctionManager.register", "statement": "v.register(...);", "surroundingStatements": [ "var workbook = context.workbook;", "var v = Microsoft.ExcelServices.CustomFunctionManager.newObject();", "// >>>>>", "v.register(...);", "// <<<<<" ],

Screenshot: