
If you found this post, you have most likely gone through the ‘normal’ authentication process before. Otherwise, check out this great post on how to authorise Google Apps Scripts by Kieran Dixon.
The “This app is blocked” error is a little different, as there is no more buttons that we can click on to continue authorising this app.
In this post, we’ll be going through a quick workaround so that you can get back to running your scripts. Note that this issue is still not entirely resolved, but you can follow any developments in Google’s issue tracker.
Configuring your project on Google Cloud Platform
Firstly, open up your ‘Project Settings’ in the Apps Script manager:

Then, under the ‘Google Cloud Platform (GCP) Project’ section, click ‘Change Project’. You should see the following screen:

Click the link in step 1. You will be redirected to your free ‘Google Cloud Platform (GCP)’. Here, click the ‘Select a project’ dropdown and create a new project.



Then, go to the ‘OAuth Consent Screen’ on the sidebar menu.

You now need to configure your project settings. For free Gmail accounts, select the ‘external’ user type:

Then, fill in any required fields. You can put the same email for both ‘User Support’ and ‘Developer’ email fields:

In the next page, click ‘add or remove scopes’ . You will then see a list of scopes available for your project. If you know which scopes you are using, select the relevant items. Otherwise, you can select all the scopes.


Scroll down in the sidebar and click ‘Update’. Then, scroll to the bottom of the ‘Scopes’ section and click ‘Save and Continue‘.
Next, add the users who should be granted access to your Google Apps Script.

After clicking ‘Save and Continue’, you can return to the main Google Cloud Platform page. Note that at this point, your project is still in ‘testing’. This means that you will be limited to the 100 user cap limit. However, as you don’t have to submit any verification applications to Google, you should be able to continue developing and testing your Google Apps Script.
Configuring your Google Apps Script project
After configuring the security settings, you should find your ‘Project Number’ in the Google Cloud Platform dashboard:

Copy the ‘Project Number’ into your Apps Script manager settings from above and click ‘Set project’. Your Apps Script project is now a ‘Standard’ GCP project under the ‘testing’ mode:


Running your Google Apps Script
You can now attempt to run your Apps Script. If the active user account has been added when we configured our users earlier, then you should see the following prompt:

Click ‘Continue’. You will then be able to authorise app permissions as before. If the active user hasn’t been added in the GCP project, you will see the following prompt:

To resolve this, ensure that the user Gmail account has been added to the OAuth consent screen for the project in Google Cloud Platform.
Notes
- This solution will likely work for personal Gmail accounts. If your company has an enteprise subscription Google Workspace, it is better for you to contact your Admin to help resolve this error.
- At the end of this solution, your project is still in ‘testing’. There are some limitations to this phase, which is why Google recommends you submit an application to verify your project if additional functionalities are required.
Hopefully you can get your Apps Script back up and running and continue developing as needed. Let me know in the comments if this has worked for you!
12 responses to ““This app is blocked” error on Google Apps Script [solution]”
You are a hero, it works.
LikeLiked by 1 person
Glad I could help! Hopefully Google comes up with a more permanent solution
LikeLike
You are a hero, it works again, finally.
LikeLike
Aiman, my man, thanks a lot for this!
LikeLiked by 1 person
It ain’t pretty but it works XD
LikeLiked by 1 person
I already had gone through all of these steps EXCEPT adding all scopes (I had only added the scopes I thought I needed). Script will successfully run but once a week (for past couple of months) I have to reauthorize. Just now I added all scopes. Will this fix the once a week reauthorization issue? Have you heard of this?
LikeLiked by 1 person
I haven’t seen this yet, Lara. Weird. Let us know how it goes.
LikeLiked by 1 person
There are many people on the discussion in developer forum with same exact issue – a few have commented since I updated that discussion with this same reply. i’ll let you know what I learn.
LikeLiked by 2 people
[…] you get an error message, please check out blog post by Aiman Fikri for how to fix […]
LikeLiked by 1 person
Great explanation. Images are also helpful. And most important this solution works. I don’t understand why google sometimes gives these (IMO) useless error messages. I would have never thought of going to the Google cloud platform and making these changes.
LikeLike
You nailed it, thank you so much! You saved me hours of time.
LikeLike
OMG, THANK YOU! Finally, a solution that works. I’ve been searching for months for an answer to this issue to no avail. It’s probably helped that I’ve become a bit more comfortable with Google Cloud Console over the past couple of months, but regardless, this solution works and that’s all that matters. Thank you again!
LikeLike