无法授权任何ANY文件上的任何外部Google Apps脚本范围 [英] Unable to authorize ANY external Google Apps Script scope on any ANY file
问题描述
一段时间以来,我无法通过我的Google帐户在Google Apps脚本中授予任何新的OAuth授权,该范围不在我正在使用的文件范围内( .currentonly
起作用,其他一切都没有.)
For some time now I'm unable to give any new OAuth authorization in Google Apps Scripts from my Google Account for a scope that is outside the file I'm working from (.currentonly
works, everything else doesn't).
它要求我要使用的Google帐户,选择显示的帐户后:
It asks for a Google account I want to use and after selecting the account it shows:
此应用已被阻止
此应用尝试访问您Google帐户中的敏感信息.为了确保您帐户的安全,Google阻止了此访问.
This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.
查看屏幕截图:
甚至没有显示具有所请求的权限概述的屏幕.我尝试向其添加权限的每个新的或旧的电子表格文件都会发生这种情况.但是在停止工作之前已经获得OAth的电子表格会定期使用项目触发器进行更新.
The screen with the requested permissions overview is not even shown. This happens for every new or old Spreadsheet file I try to add the permissions to. But Spreadsheets that already got the OAth before this stopped working are regularly updated with project triggers.
这是我的清单文件:
{
"timeZone": "Europe/Paris",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets.currentonly", // this works
"https://www.googleapis.com/auth/drive", // this doesn't work
"https://www.googleapis.com/auth/spreadsheets" // this also doesn't work
],
"runtimeVersion": "V8"
}
当我尝试通过其他Google帐户执行所有操作时,一切都会正常.因此,我认为这与整个Google帐户设置有关.
Everything works when I try to do the same from a different Google account. Because of this I think it has something to do with the whole Google account settings.
我尝试启用较少的安全应用访问权限
,但这没有帮助.
I tried enabling Less secure app access
but it didn't help.
是否有可能在该帐户中禁用了来自未验证的第三方应用程序的访问?如何再次启用它?
Is is possible that the access from unverified 3rd-party apps is disabled in that account? How can I enable it again?
推荐答案
我今天第一次遇到这个问题,但是我的问题似乎是由于以下原因造成的:
I ran into this for the first time today but my issue seems to be due to:
- 在其他组织拥有的共享驱动器上创建工作表
- 我的组织使用旧版应用程序脚本界面,共享驱动器组织使用新的应用程序脚本界面
使用共享驱动器组织中的帐户创建脚本解决了我的问题.
Using an account from the shared drive organization to create the script solved my issue.
这篇关于无法授权任何ANY文件上的任何外部Google Apps脚本范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!