You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Cloud Identity REST API按displayName搜索群组?

问题:Cloud Identity API通过displayName检索群组返回400错误

我尝试使用Cloud Identity REST API通过displayName检索群组。根据官方文档,应使用search方法并传入以下查询参数:

parent == 'customers/{customerId}' && displayName == '{groupName}'

但请求返回400错误:

HTTP/1.1 400 
cache-control: private
content-encoding: gzip
content-length: 129
content-type: application/json; charset=UTF-8
date: Tue, 25 Apr 2023 08:24:44 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}

为排查查询语法问题,我测试了以下几种查询语句:

查询语句响应结果
parent == 'customers/{customerId}'成功
parent == 'customers/{customerId}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels成功
parent == 'customers/{customerId}' && domain_name == '{domain}'成功
parent == 'customers/{customerId}' && groupKey == '{groupEmail}'失败
parent == 'customers/{customerId}' && displayName.contains('{groupName}')失败
parent == 'customers/{customerId}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels && displayName == '{groupName}'失败

显然问题出在使用displayName或groupKey参数的查询中。

我是否遗漏了什么?我曾怀疑是用户权限或Google Workspace/Cloud Identity层级/配置问题,但根据官方文档,这类问题应返回403错误,而非当前的400错误。

内容的提问来源于stack exchange,提问作者Ricardo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 04:05:17