有没有办法让非管理员用户从域中的组列表中搜索?

Is there a way to search from the list of groups in a domain by a non-admin user?

当我尝试以非管理员身份列出域中的组时,目录 API 抛出 'Not Authorized to access this resource/api' 错误。但是 gmail 也会为非管理员用户自动完成组名(这意味着它能够检索组列表)。有没有办法在不成为管理员的情况下获取组列表或从域中的组列表中搜索?

如果您不是管理员用户,最好的方法是使用服务帐户模拟管理员。您需要为您的服务帐户启用域范围的委派,以便在发出请求时模拟域管理员。看到这个 SO post and another discussion for this github post.