0

Using scripts in google tables, I work with google forms. Using my main account, which is located in the domain of the organization to which I belong, everything is fine.

When I use the new Google account, then the script crashes with an error:

"This operation is not supported." In the Google tab: "Security Check" on the second account, the application is indicated as made by "Unverified Developer".

An error occurs when trying to edit a form created by a script.

The code is called by a POST request with JSON parameters. Queries are allowed to anonymous users.

I tried to check the box to enable unverified applications

var form = FormApp.create(NewForm.name);        
form.setRequireLogin(false)
    .setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId())
    .setDescription(NewForm.description)
    .setConfirmationMessage('Спасибо за ваши ответы!');

expect the script to work without errors

Marios
  • 26,333
  • 8
  • 32
  • 52
  • Are both accounts part of the same domain? and also, whewre are you running the script from? – AMolina Sep 03 '19 at 13:57
  • See [this](https://stackoverflow.com/a/49317729) – TheMaster Sep 03 '19 at 16:06
  • @AMolina The first account is in my organization’s domain. The second account does not belong to this domain. The second account was registered using Google’s usual means. – Александр Чурсин Sep 04 '19 at 06:26
  • @TheMaster Even after confirming in the "advanced" menu and allowing the use of unsafe applications, this did not help. – Александр Чурсин Sep 04 '19 at 06:30
  • Since the accounts are on different domains it might be an issue with permissions, is your script bound to any particular file in the first account (the one in the organization's domain)? – AMolina Sep 04 '19 at 06:53
  • @AMolina Forms and Google tables that are processed from the script are on the same account. Everything works on the first account. I transferred the functionality from the first account to the second. The second account has problems. The scripts, table, and forms are the same, but the error "This operation is not supported." when the script is editing the new form that it created. The difference between accounts: The second account is not an approved developer. The first account is paid in the domain of my organization. – Александр Чурсин Sep 04 '19 at 07:24
  • 1
    How is the web app published? Try setting "Execute as" to `Me` and "Access" to `Anyone even anonymous` – TheMaster Sep 04 '19 at 08:20
  • @TheMaster I originally Deploy it as a web application with these settings – Александр Чурсин Sep 04 '19 at 14:42
  • Explain how the second account runs the script. By POST request? Where are the form, tables that you're edit? In the first account's Google drive? Or the second account's Google drive? – TheMaster Sep 04 '19 at 14:47
  • @TheMaster The table, form, and script are on the second account and they are in no way associated with the duplicate set of tables, forms and scripts on the first account. The script receives data on a POST request and processes it with a table and created forms on the same account as it is. I developed the functionality on the first account, but it should work on a third-party account - the second. – Александр Чурсин Sep 05 '19 at 06:39
  • Could you try running the script directly from the script editor from the second account providing [a dummy `e` object](https://stackoverflow.com/a/16089067) – TheMaster Sep 05 '19 at 07:27

0 Answers0