【问题标题】:how to get suspended user status from google api using oauth如何使用 oauth 从 google api 获取暂停的用户状态
【发布时间】:2013-05-03 21:21:19
【问题描述】:

我正在寻找一种方法,使用宣誓授权从任何 google apis 获取组织中未暂停用户的列表。

google profile api有oauth,但返回的用户列表不包含isSuspended标志。

google 配置 api 返回 isSuspended 标志,但据我了解不能被 OAUTH 授权。

我还有其他选择吗?

【问题讨论】:

    标签: google-api google-provisioning-api google-profiles-api


    【解决方案1】:

    是的,Provisioning API 适用于 OAuth 1.0 和 2.0。请参阅docs and necessary scopes here

    如果您只需要整个 Google Apps 实例中的所有用户,请使用 retrieve all users in all domains API call,然后使用 isSuspended = True 过滤掉用户。

    如果您还需要将列表过滤到某个组织单位 (OU) 下的用户,也可以使用 Retrieving An Organization Unit's Immediate Sibling Users API 调用,然后将您的列表过滤到 OU 中且未被禁用的用户。

    【讨论】:

    • 非常感谢,我发誓我从上到下阅读了 prov api 页面几次,但不知何故错过了它链接到您发布的第一个链接的位置。这真的节省了我的身后,谢谢!
    • 嘿,Jay,我无法检索所有用户。我走过this docs,但我一直得到 401 - 我如何让这个 GET 请求工作?它期望哪些标题?提前致谢!
    猜你喜欢
    • 2013-04-05
    • 2019-01-07
    • 1970-01-01
    • 1970-01-01
    • 2020-12-17
    • 2012-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多