Reputation: 11
In 2014, a user in our company created a series of spreadsheets to track money, and he's now retired. Everything worked until recently. (Also, we are gsuite customers, which is relevant since the sheets are shared within the company.)
I am trying to run a script attached to the "Summary" spreadsheet to move everything to the "History" spreadsheet, and then reset the "Summary" to this month. This code has worked since 2014, including when the regular user switched from July 2020 to August 2020. Now, when I run the script from the sheet, it says "Authorization required: A script attached to this document needs your permission to run." Based on this google documentation, there's nothing I can do to make it not ask permission.
Once I hit continue, it says "Authorization Error. Error 401: deleted_client The OAuth Client was deleted."
This spreadsheet hasn't been shared outside our domain, and shouldn't be used outside our domain. Google says here that "Verification is not required for Apps Script projects whose owner and users belong to the same G Suite domain or customer." which is exactly what we have.
So why does it require authorization?
As far as I know, nothing has been deleted. The retired user's account is still open.
I have also tried going into console.developers.google.com and created a project with oauth credentials, but that doesn't seem like what is needed.
I can update with code if you feel it's necessary, but it doesn't seem like a code problem.
Edit: Working on a minimal reproducible example, but it's taking a while. I tried to just have the Summary and History spreadsheets, but part of annonymizing the data involved removing links from the 6 department spreadsheets. Removing those "fixed" the problem. Instead of saying "The OAuth Client was deleted." it acted as normal. (It showed my logged in account, I clicked it, etc, it worked.)
The issue seems to be related to importing data from 6 spreadsheets into one, and then moving all that data. I'm working on that.
Upvotes: 0
Views: 582
Reputation: 11
Using what Alan Wells said about the "Cloud Platform Project," I found this StackOverflow post and followed it. I made a copy of the script and deleted the old one. I refreshed the spreadsheet, and now the authentication works!
Upvotes: 1