如何查找Google Apps帐户的不可变ID?

Gar*_*ast 13 google-admin-sdk

许多Directory API调用都需要一个客户参数,称为"Google Apps帐户的不可变ID.(字符串)".

如GET https://www.googleapis.com/admin/directory/v1/customer/ 客户 /域

我不知道如何为我的Google Apps帐户查找/生成此内容.我是管理员.

有人能指出我正确的方向吗?

rsm*_*thy 13

我能够找到customerId如下

  1. 转到admin.google.com
  2. 安全 - >设置单点登录(SSO)

你会看到这样的网址:

https://accounts.google.com/o/saml2/idp?idpid=Cxxxxxxxx

那个Cxxxxxxxx是你的customerId


Bri*_*ins 6

有同样的问题,所以我不得不联系他们的聊天支持.

官方的答案是:
没有任何网络界面可以查找这些信息 - 正如我在"组织管理面板"中所期望的那样.获取此信息的唯一方法是从代码中获取.

你必须编写额外的代码来请求有关的任何现有用户的信息:
(链接到API文档 - GET:https://www.googleapis.com/admin/directory/v1/users)
并在响应中,你可以找到现场customerId哪些对于所有域中的公司中的每个用户都是相同的.

这是找到你的组织的唯一方法customerId......

不是用户友好的,所以我现在就向Google提交"功能请求".

  • 这种方法需要客户ID让我感到困惑.我后来发现'my_customer'可以用来代替客户ID,实际上客户ID也包含在响应中. (2认同)