GAS deploying option "Anyone, Even Anonymous" option is not available - google-apps-script

I'm trying to use my google script app in the google site which should be publicly available to anyone.
When I'm trying to deploy my google script as a web app (Publish->Deploy as web app), in the "Who has access to the app" field, the "Anyone, Even Anonymous" option is not available. I have only "Only myself" and "Anyone within my domain".

** RESOLVED **
Hi guys,
This somehow misled me by choosing "User accessing the web app" under Execute the app as where it should be "ME"!
Only then then "Anyone, even Anonymous" will show up in the next dropdown. Took a while before I figured this out as I realized that Google needs to know the account who will execute the script. If its any user, then it will surely prompt the account login to where it should associate the "executor" of the script with. So if its always ME (your account) then it won't prompt anymore of any authentication.
This is where I can really mark this as RESOLVED!
Deploy as Web App window

For anyone that comes across this and is using the new Apps Script IDE, I found that the option only exists when using the legacy IDE.

In order to let users in the domain to share the webapp with "Anyone, even anonymous", your domain Admin should do the following:
Visit Google Admin console.
Select Apps > G Suite > Settings for Drive and Docs > Sharing settings.
In Sharing options > Sharing outside of [Your domain], select ON.
Beware, because of a current bug, if you created the script when the sharing settings were OFF, you won't be able to share it outside the domain, even if you change that. The sharing settings are applied when the script is created, and those settings cannot be changed. A new script should be created for that (after enabling sharing outside the domain).
Reference:
Issue Tracker: Cannot select "Anyone, even anonymous" option in web app publication screen

Related

How to fix "Sign in with Google temporarily disabled for this app" screen on an unpublished bound script?

I made a new google sheet with a simple script that does an external call with UrlFetchApp.
However, when I try to run or test the code, it says authorization required. App needs permission. I then click on review permissions, followed by clicking on my Gmail account.
Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.
Any advice on how to resolve this? Why is this showing up for my own unpublished unfinished code?
Reasons
Making external calls is a sensitive scope. If by any chance you tried to authorize from any (reauthorizations count as well) account 100 times (see user cap help page) throughout the development process, you will not be able to proceed.
That is usually the primary reason for this screen, but sometimes you get locked even if the project is new (for example, for some G Suite accounts). If that happens, in my experience the only way to fix it is by going through the review.
There is also a thread on the issue tracker if cannot resolve it with methods listed below.
Finally, take a look at related Q&As:
"Sign in with Google temporarily disabled for this app" error when trying to authorize a script
How can I bypass "Sign in with Google temporarily disabled for this app" in a Google Sheets script?
How to fix
Switch the Google Cloud Platform Project to a new standard one. This will reset the counter.
Create a new bound script from a new Google Sheets spreadsheet (this works the same as switching GCP, as a default cloud project is assigned to the script project).
Go through the OAuth verification process. Don't worry, it is not that long and only requires a video of how you use the scopes.

Unable to set project name in the "grant permissions" dialog for Google Apps Script Add-on

I have an add-on for Google Sheets that's currently being tested within my domain. For this post, let's call it My First Add On. When users install the add-on they're prompted for permissions, but it always appears as "Untitled project" in the dialog box:
The project name is set to My First Add On everywhere I can find:
The Google Apps script project name
The Google Cloud Platform project name (IAM > Settings)
The Google Chrome Web Store add-on name (Developer Dashboard)
My add-on is published with 'private' visibility, available only to people in a given Google Group (my trusted testers).
I've searched through documentation and forums to see what I'm missing here, but can't find anything that covers this scenario.
This has to be something basic, but I'm completely stuck and the only support option available to me is to post here. I'd be grateful for any help, folks!
I've seen something similar, where the name of the script isn't updated if you test it before saving the name (ie, create a name when prompted rather than before testing). Try clearing your cache, closing out of the tab, etc, and then launching again. I'm not sure it's something you can fix in code or listings anywhere.

Can't make a Google Apps Script publish for anonymous users

I've built a Google Apps Script and when I try to publish it won't show an option to allow anonymous users. There are only two options: "Only myself" and "Anyone within mydomain.com"
We're using Google Apps for Business (or Work is it now?).
How do I make the other options available?
Sharing outside your Google Apps Domain may be disabled in Admin Console.
In your Google Apps Admin Console, go to Google Apps section, then Drive, click Sharing Settings and check that "Users can share files outside this organization" option is selected. Also select appropriate checkboxes below that option as necessary.
If your organization policies prevent sharing outside your domain, you can create and deploy your webapp from your personal gmail account instead.

Allowing anonymous access to Google Apps Script web app (Google Apps account)

I have a spreadsheet in my Google Drive that I would like to share through a web app. I want the script to run as me and allow everyone to access the web app.
When this is done in my personal Google account (non Google App account), I get "Anyone, even anonymous" option under "Who has access to the web app" section in the "Publish as a web app" dialog in the Apps Script editor. And everything works fine.
However when I try to do the same thing in my Google Apps account in my organization, I do not get "Anyone, even anonymous" option under "Who has access to the web app" section. Only options that are presented is "Only myself" & "Anyone within XXXXXXX.com"
Anybody have any idea why this is happening? Is there any security option that I can change in my Google Apps domain?
Thanks
Have you checked with your Google Apps Administrator? They might have enforced a policy that one can not share the docs outside the organization.
Here is the documentation on docs sharing policy.
https://support.google.com/a/answer/60781?hl=en
This setting is controlled by the domain administrator via the "Allow users in [domain] to publish files on the web or make them visible to the world as public or unlisted files" options that's under "Settings for Drive and Docs".
Note that after checking that option, you'll have to create a new Script in order to be able to publish it with "Anonymous" access. Existing scripts don't seem to get that option even after the setting has been changed.
Also note the Google issue tracker for this: https://issuetracker.google.com/issues/36764781

Google App Script no longer have "Allow anyone to access" option when deploy to web app

i have a couple of google app script that reads and writes to a google spreadsheet
I used to deploy the script as a service to allow anyone to access, I allow "invoke as me"
Recently, I notice that the interface has changed to "deploy as web app"
However, now there is no option to "allow anyone to access". There is only 2 options to run the script either "only me" or "only anyone in domain"
Has Google changed the policy to not allow anyone to access scripts?
Or have I done anything wrong? Please advise
I really need the scripts to run publicly
urgent. thanks
It is possible. Here's what I did:
Go to the control panel of your Google Apps Account (instructions here)
Select the Settings tab
On the left, under Services, select Drive & Docs
In Sharing Options, select "Users can share documents outside this organization" (I've left the "Warn users..." check box blank)
Also in Sharing Options, I've selected "Private" under Document Visibility but I'm not certain that's necessary. You could try with/without.
Go back to Deploy as webapp in your script project and you should now see "allow anyone to access" - at least I do in mine!
The documentation seems to be quite clear on this matter, you haven't done anything wrong :
After you write the script, you publish it as a service. During the publishing process, you define who has access to the script.
In a Google Apps domain, you can publish the script so that only you have access or so that everyone in the domain has access.
In a Google consumer account, you can publish the script so that only you have access or so that everyone in the world has access.
If you need anyone outside your google apps domain to access your spreadsheet data you could install the script on a consumer account (that has sharing permission on the domain spreadsheet) and publish it from there.