How do I find the immutable id of my Google Apps account?

后端 未结 4 908
清歌不尽
清歌不尽 2020-12-18 22:28

Many of the Directory API calls require a customer parameter referred to as the \"Immutable id of the Google Apps account. (string)\".

e.g. GET http

相关标签:
4条回答
  • 2020-12-18 22:40

    The easiest way I found was to use the APIs Explorer at the bottom of the documentation for the Customers: get method on the Directory API (Admin SDK). Enter 'my_customer' for the customerKey on the form and hit the 'Authorize and Execute' button.

    The response will include the CustomerId (e.g. Cxxxxxxxx) as the "id". The entire response will look something like this:

    {
      "kind": "admin#directory#customer",
      "id": string,
      "etag": etag,
      "customerDomain": string,
      "alternateEmail": string,
      "postalAddress": {
        "organizationName": string,
        "countryCode": string,
      },
      "language": string,
      "customerCreationTime": datetime
    }
    
    0 讨论(0)
  • 2020-12-18 22:53

    I was able to find the customerId as follows

    1. Go to admin.google.com
    2. Security -> Set up single sign-on (SSO)

    You will see URLs like this:

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

    That Cxxxxxxxx is your customerId

    0 讨论(0)
  • 2020-12-18 22:55

    If you are part of an organization, you can find it here as Organization ID: https://play.google.com/work/adminsettings?pli=1

    It works for G Suite accounts and Gmail accounts that are associated with an organization, but not for individual Gmail accounts.

    0 讨论(0)
  • 2020-12-18 22:58

    Had the same question, so I had to contact their chat support.

    The official answer was:
    There are no any web interface to look up this information - as I would expect for example in "organisation admin panel". The only way to get this information is from the code.

    You have to write extra code to request information about any existing user:
    (Link to API Docs - GET: https://www.googleapis.com/admin/directory/v1/users)
    And in the response, you can find field customerId which is the same for each user in the company across all domains.

    That is the only way to find your organisation customerId...

    Not user-friendly, so I will submit "Feature Request" right now to Google.

    0 讨论(0)
提交回复
热议问题