13

I am trying to run this simple Google Script.

However, it does not allow me to authorise. How can I proceed?

animation showing the sign-in disabled error

TheMaster
  • 45,448
  • 6
  • 62
  • 85
orschiro
  • 19,847
  • 19
  • 64
  • 95
  • 1
    Does [switching cpp](https://developers.google.com/apps-script/guides/cloud-platform-projects#switching_to_a_different_standard_gcp_project) make the error go? – TheMaster Dec 18 '19 at 16:24

5 Answers5

11

Update 1:

  • As reported by Rubén, Google says it won't fix this - #163
  • Some workarounds are provided in #76, #145 and #150 - showing solutions like changing GCP and providing a oauth consent screen.

Update:

Switching Google cloud project from default to a standard project have resolved the issue for some users. This is still a workaround and may not work for all. Therefore, star the issue below.


This seems to be a new issue affecting certain users. You can ★(on top left) star the issue here to let Google developers know that you're affected by this issue and to prioritize the issue.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
3

It stopped complaining once I specified the script only needed access to the current sheet. Google explains how to do it here.

All you need to add to your code is this JsDoc annotation:

/**
 * @OnlyCurrentDoc
 */
Emma
  • 39
  • 1
  • Hi Emma! Please add some into about why exactly doe the @OnlyCurrentDoc solves the issue (your answer is valid, but this Q&A is frwequently referenced for other questions, and we strive to have as good a set of answers as possible) – Oleg Valter is with Ukraine Jul 17 '20 at 02:11
  • No any difference - still forcing authorization. – Evgeniy Aug 27 '20 at 12:50
2

That's something that happens. To solve the issue just copy the contents of your Script, delete it, and create a brand new one with the same contents, or give it another name in case you are superstitious. If that doesn't work, create another Spreadsheet with the same contents and proceed. Sometimes it's just a temporary issue. Perhaps the problem persists due to the stored browsing data, so it would be convenient to clear it. (I challenge you to take this last move!)

1

After going through the process twice with a client, I can confirm that the most reliable way to fix the error currently is to go through the verification process. An important note is that after approving the scopes, some accounts need to approve every other sensitive scope that is added to the script and cloud project as well or the issue will resurface.

So the step-by-step guide is as follows:

  1. Switch from default to standard Google Cloud Project
  2. Fill in the OAuth Credentials screen and add all sensitive scopes
  3. Click on "Submit for verification" and prepare a YouTube video showing
    both authorization process and usage of each of the sensitive scope
  4. Wait until the verification team sends you an email (usually 1-2 days, but no guarantee here) and reply with the link to the video, then wait for the verification process to complete
  5. If you received a "Granted" response, continue to steps 6 & 7, if not - follow the instructions provided
  6. Remove all previously granted permissions to the project
  7. Reauthorize the script by running it again, everything should be working
1

Having the same issue no solution of listed in this thread were working for me. After faied authentification i always get the screen as the topic starter gets it, without the "advanced" option.

However i've managed to get at least a limited access and run my script on the following way:

  1. I share the affected sheet to anybody with link, with editor access level.
  2. Then, from incognito window (maybe it isn't necessary, but i did it so), I've logged in into my other Google account,
  3. opened the link, which was shared,
  4. was forced to authorize myself,
  5. failed on authorization - but the screen with failed authorization contains the "advanced" option,
  6. clicking on it i've got a limited access and was able to run the script.
Evgeniy
  • 2,337
  • 2
  • 28
  • 68