LiamK
LiamK

Reputation: 13

Google apps script deployment permissions required separately for spreadsheet?

When running the app Getting: You do not permission to access requested document line 66. (offending line is attempting to open a spreadsheet:

var ss = SpreadsheetApp.openByUrl(url);

Do I need to set permissions separately for both the spreadsheet and the application?

I deployed code as a web app, with permissions set to 'anyone'. I selected: Who has access to the app: to 'Anyone', and Execute the app as: 'User accessing the web app'

I want to share the app with colleagues.

Upvotes: 1

Views: 533

Answers (2)

TheMaster
TheMaster

Reputation: 50383

Yes. You need to set permissions separately for both the spreadsheet and the application if you set the web app to run as User accessing the web app. This is not needed if you set the webapp to run as Me.

Upvotes: 2

Wicket
Wicket

Reputation: 38121

The web app published from Google Apps Script has it's own access settings no matter if the script is a bounded or a standalone script. Using "User access the we app" on a web app that use SpreadsheetApp methods to access an spreadshet implies that the spreadsheet should be share with those users.

Upvotes: 0

Related Questions