Getting all groups an user is a member of through oauth (google)

I'm building a web-application that lets users login with a google-apps account. I need some userinfo, nr of new e-mails, calendar access and all the groups (in my domain) the user is a member of. The trouble is that i can't find the right scope (and endpoint) to get the groups a user is member of. Does somebody knows if it is possible? And how it's done...

What I got so far: I've played with the Groups-provisioning scope (https://apps-apis.google.com/a/feeds/groups/) the problem is that you have to be an administrator to view the data.. And I want all users to see there memberships... The google oauth playground isn't getting me further (https://code.google.com/oauthplayground/)


i had the same problem and figured it out.

  • needed scope is "https://apps-apis.google.com/a/feeds/groups/"

  • API request looks like this: "https://apps-apis.google.com/a/feeds/group/2.0/{domain}/{group name}/member" as a header of request use: 'Authorization': "OAuth " + {access_token}

  • google application account holder must have roles by following manual(reading rule at least):

  • To enable the Provisioning API for a Next generation control panel:

  • Log in to your admin account and select Domain settings.
  • Select the User settings tab.
  • Select the checkbox enabling the Provisioning API, and save your changes.
  • To enable the Provisioning API for a current control panel:

  • Log in to your admin account and select the Users and groups tab.
  • Select the the Settings subtab.
  • Select the checkbox to enable the Provisioning API and save your changes.
  • Domain administrator only has possibility to change this settings.


    因此,这意味着您必须在您的域中列出群组,并将用户的电子邮件与域中所有群组中的所有电子邮件进行比较。

    链接地址: http://www.djcxy.com/p/61818.html

    上一篇: 这个分区算法是否正确?

    下一篇: 获取所有组的用户是通过oauth(谷歌)的成员,