【问题标题】:How do I grant my Google Cloud service account access to G Suite?如何授予我的 Google Cloud 服务帐号访问 G Suite 的权限?
【发布时间】:2016-12-21 17:50:57
【问题描述】:

我有一个Google Cloud Platform 服务帐户,我想启用它来阅读我的G Suite 帐户的电子邮件。但是,当我按照the prescribed procedure 在 G Suite 管理界面(安全 -> 管理 API 客户端访问)中将服务帐户授权为客户端时,表单失败并显示错误“此客户端名称尚未向 Google 注册。 '。我提供了我的服务帐户密钥文件的客户端 ID 作为客户端名称。

我应该为客户名称提供什么,以便它起作用?

【问题讨论】:

    标签: oauth google-api google-cloud-platform


    【解决方案1】:

    创建服务帐户时,如果要访问 G Suite,则必须启用“Google Apps 域范围委派”。谷歌文档中解释得很差。否则我的程序是正确的,应该使用凭证 JSON 文件中的 client_id 字段。

    【讨论】:

    • 当我启用该选项时,它告诉我To change settings for G Suite domain, product name for the OAuth consent screen must be configured. 这似乎与应该为Allows this service account to be authorized to access all users' data on a G Suite domain without manual authorization on their part. 的这个域范围委派选项的全部意义相冲突。我是否遗漏了什么,或者这只是 Google 的一个非常令人困惑的矛盾?
    • 结果你只需要创建 Oauth 同意屏幕,即使没有人会看到它。这整个过程让我非常困惑,所以我记录了分步说明,以防其他人发现它有帮助:fin.com/eng-blog/navigating-the-google-suite-directory-api
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-08
    • 1970-01-01
    • 2017-11-24
    • 1970-01-01
    • 2021-05-01
    • 2021-04-19
    • 1970-01-01
    相关资源
    最近更新 更多