SpreadsheetApp.getSelection() fails with scope auth/spreadsheets.currentonly

95 views
Skip to first unread message

Faustino Rodriguez

unread,
Oct 17, 2019, 10:46:01 AM10/17/19
to Google Apps Script Community
I just opened an issue ticket

Sharing here, in case somebody else is affected or even if there is any suggestion to fix this problem

Basically,
- the function SpreadsheetApp.getSelection()
- throws an error: "You do not have permission to perform that action."
- if the scope is just auth/spreadsheets.currentonly (//@OnlyCurrentDoc)

It worked before and it is still working for a deployed add-on

p.s. Hopefully I am missing something trivial ...

Thanks

Alan Wells

unread,
Oct 17, 2019, 11:19:49 AM10/17/19
to Google Apps Script Community
If the document is read-only (view or comment) mode, or the script is not bound to a document, or the user had installed the add-on but not authorized the permissions, those situations would cause a problem, but other than that, it doesn't seem like you should be getting an error.
And since it worked before, and isn't working now; when that happens I tend to wonder if it's something that Google did.

That issue was just assigned to someone, so maybe it's a real bug that they plan on fixing soon?

Faustino Rodriguez

unread,
Oct 17, 2019, 1:47:16 PM10/17/19
to Google Apps Script Community
You are right in your assertions
And the fact they assigned it so fast is also encouraging
Thanks
Reply all
Reply to author
Forward
0 new messages