Is it possible to have part of an editor Apps Script run if the user isn't signed into Google?

86 views
Skip to first unread message

Michael Leggett

unread,
Mar 23, 2020, 7:01:14 PM3/23/20
to Google Apps Script Community
Is there any way to have an editor Apps Script run for someone NOT signed into a Google Account?
The spreadsheet is set to anyone with the link can edit.

A little context: we built an Apps Script on a spreadsheet that we duplicate and share as part of a larger app. In testing, parts of the script it worked without the new user giving permission (like onEdit that just depends on the event) while other parts required they give the script permission to run.

But when some users used the spreadsheet without being signed into Google, we realized none of the Apps Script is running. We've tried publishing it as a web app and setting the access to ANYONE_ANONYMOUS but that didn't solve it:

"webapp": {
  "access": "ANYONE_ANONYMOUS",
  "executeAs": "USER_DEPLOYING"
},

We tried publishing it as an Add-on but if the user isn't signed into their Google Account, the Add-on doesn't run. 

Thanks for any advice or help,
Michael Leggett
Director of Product, Nori

Alex

unread,
Mar 25, 2020, 10:23:57 AM3/25/20
to Google Apps Script Community
Hi Michael!

All of this is a part of security. You can do nothing without a source allocation. For the allocation you have to sign-in to the system.

Best, Alex.

Michael Leggett

unread,
Mar 25, 2020, 10:35:54 AM3/25/20
to Google Apps Script Community
Thanks Alex -- that's what I was afraid of. 

I guess I got my hopes up because of the "access": "ANYONE_ANONYMOUS". 

Kim Nilsson

unread,
Mar 28, 2020, 12:05:03 PM3/28/20
to Google Apps Script Community
Michael,

you could of course change the executeAs to be the owner of the script.
But, that would then be the case for anyone who runs the file.
Message has been deleted

Michael Leggett

unread,
Apr 20, 2024, 12:56:55 PM (6 days ago) Apr 20
to Google Apps Script Community
Can a moderator please delete the above message? 
I sent it from a previous work account and it has my personal phone number in it which is searchable on the web. 

Kim Nilsson

unread,
Apr 20, 2024, 12:58:48 PM (6 days ago) Apr 20
to Google Apps Script Community
Done!
Reply all
Reply to author
Forward
0 new messages