Gsuite 资源无法与服务帐户共享

Gsuite resources can't be shared with service account

我正在尝试在 spring 引导项目中获取房间(从 calendar.google.com 添加)服务帐户(从 https://console.cloud.google.com/iam-admin/serviceaccounts 创建)。
我有一个 4-5 个月前创建的服务帐户,它正在运行,并且仍在与 3 个特定房间一起使用。
但是如果我给其他房间添加服务账号邮件,那么这些房间在项目中是不会返回的。
我做了这里写的所有步骤:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount https://support.google.com/a/answer/1034381?hl=en

此外,我尝试从日历中房间的 "Share with specific people" 列表中删除服务帐户电子邮件,然后将其添加回去(这在过去有时会有所帮助)。

但是重新添加的房间在我的项目中也没有返回。 我正在使用 java 中的这种方法来获取房间。
https://developers.google.com/calendar/v3/reference/calendarList/list
这看起来像一个错误,所以你知道我该如何解决这个问题吗?

如果您通过 UI 与服务帐户共享资源日历,通过在 Settings and sharing > Share with specific people 中添加相应的电子邮件,日历可能尚未添加到 CalendarList。

为了确保将日历添加到服务帐户的 CalendarList 中,您应该使用 API 并调用 calendarList.insert

更新:

Issue Tracker 中目前有几个与日历中的服务帐户相关的未解决问题。您遇到的情况很可能与此有关:例如,检查 this, this and this

与此同时,我认为无法避免使用 API。也许你可以开发某种 UI 来减轻痛苦?

希望对您有所帮助。