How to get a CustomerId (or other primary key) for a Google Apps account?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 17:13:45

To make the Admin SDK work after installation of your Google apps marketplace app, you must :

  • add the admin SDK to your cloud project

  • add the Google Apps marketplace SDK to your cloud project

  • go into the configuration of the marketplace app and add the required admin SDK scope

After installation, your service account will have permission to call the Admin SDK on the domain that installed your marketplace app.

The docs state : To retrieve the customerId, use the Retrieve a user operation.

So you will need at least this scope :

Additonally, you will need to know the email address of a adminstrator at the domain.

On a side note : I believe you can use "my_customer" as a replacement for the customer ID in API calls, at least for the admin SDK.

update : http://googleappsupdates.blogspot.be/2014/09/new-features-in-admin-sdk-custom-user.html Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!