How to get Google profile info including custom fields from an Apps Domain user?

后端 未结 3 1187
走了就别回头了
走了就别回头了 2020-12-16 08:11

Using the user.profile and user.email scope and the /oauth2/v2/userinfo feed doesn\'t seem to return any custom fields (in my case Department) or phone numbers. These fields

3条回答
  •  我在风中等你
    2020-12-16 08:50

    Any non-admin user can access the GAL programmatically, see:

    https://github.com/google/gfw-deployments/blob/master/apps/shell/gal/gal_feed.sh

    I don't believe this API call is documented or supported officially but it works even with OAuth authentication rather than the example's ClientLogin (tested on the OAuth 2.0 playground with a non-admin user and the standard https://www.google.com/m8/feeds/ Contacts scope).

    Note that the Global Address List is a compilation of user profiles, groups and shared contacts. You'll need to parse it out to find the user(s) you wish to get department information for.

提交回复
热议问题