Authorizations on Script do not match bound Spreadsheet after Copy

Skip to first unread message

Michael Ellis

Jan 23, 2020, 4:52:49 PM1/23/20
to Google Apps Script Community
I have a sheet containing a list of Members.   In that sheet, a user can select an individual member in the list and click a button.  The button runs a script which does the following:
1)  Copy a template sheet to a new sheet (including it's underlying script)
2)  Open the new sheet and populate a couple cells with specific formulas
3)  Share the new sheet to the selected member's email address
4)  Send an email to that user with instructions how to use their new sheet.

The formulas are IMPORTRANGE() functions which bring a list of 100 members around the original member (people he likely knows).
In the new sheet, when the Member selects a record in his short list and clicks a button, a Script should run which would reformat the data in the selected row and display it on a 2nd tab in his spreadsheet and activate that tab to display the formatted data.

The user who receives the newly created sheet is success in opening the sheet.  Unfortunately, when he selects a row in the short list and clicks the button to run the script, he gets a message saying he is not authorized to perform that function.   I looked inside the script and find that the script file was not shared with the user, even though he had change access to the spreadsheet.  I attempted to Share the script file with the user (inside the Script editor, File -> Share), but I received an error "Sorry, an internal error has occurred."  

Anybody have a suggestion what I need to do to correct this?

Michael Ellis

Jan 23, 2020, 5:15:02 PM1/23/20
to Google Apps Script Community
UGGHHHH, It was my mistake.   I needed to run the function one time to grant authorizations for the script to access my Google Drive.   It had nothing (really) to do with the new user.   Once I discovered that and corrected it, the problem went away.   Sorry to trouble you all with a false alarm.
Reply all
Reply to author
0 new messages