3

I have created a Google Scripts project that helps me manage my emails via labels and archiving. Through the interface at https://script.google.com/ I created an automatic trigger which worked like a charm for years! But it suddenly stopped working, and is now asking me to "authorize it".

When I click "Review Permissions" I land on a Authorization Error screen saying:

Error 400: policy_enforced

Request Details
access_type=offline
login_hint=frederic.mouniguet@gmail.com
hl=en_GB
response_type=none gsession
redirect_uri=https://script.google.com/oauthcallback
state=3722022919321157632
client_id=25559023822-v3uagu5v2htlkk4nepkpuqpkeh9ncnbm.apps.googleusercontent.com
prompt=consent
scope=https://mail.google.com/

I want to specify I do not own a Google Suite account, and therefore I cannot log into admin.google.com

Any help very much appreciated.

Attachment: screenshot of the popup error window

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • Feels like Google is finding new ways to screw over apps script users. – TheMaster Aug 29 '20 at 14:01
  • 1
    Did you enable [Advanced Protection](https://support.google.com/accounts/answer/7519408) for your account? Could you share the project's code? – Iamblichus Aug 31 '20 at 11:50
  • 1
    I have contacted Google Support on this particular Advanced Protection issue. Their response is to file a ticket in "Send Feedback" and it might help to solve this issue in the future. So please file your ticket. – sc li Nov 16 '20 at 08:07

1 Answers1

2

As @Iamblichus suggested, This is documented in the FAQ:

Apps Script may be blocked

If you're enrolled in Advanced Protection, Apps Script can be used. If scripts request access to certain data in your account, like emails, documents, or photos, they may be blocked.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • This was it indeed! Simply had to disable the Advanced Protection in my Google settings to allow the Google Script again. Thank you. – Fred Mouniguet Sep 02 '20 at 12:11