Limiting google directory groups APIs to caller's own groups
Asked Answered
G

1

0

We are doing a web app for our internal organization use. We need to check members and their roles for a particular group from our backend. Our google administrators are not providing us domain wide access to google admin APIs, mentioning it would be a security loop hole.

We would like to fetch the members and their roles only for the group(s) in which the authenticated user or service account is owner/manager. Is it possible without domain wide access?

Alternatively, in web front end is it possible to check a google logged in user's membership and role to a particular google group?

If there are other possible solutions or advice for our google admin, would be really appreciated.

GET https://www.googleapis.com/admin/directory/v1/groups/groupKey

Gatian answered 16/8, 2019 at 12:8 Comment(0)
C
0

https://developers.google.com/apps-script/reference/groups/

Get a list of the users groups. if group member role == owner/manager get the list of group members.

you can also just get the role. https://developers.google.com/apps-script/reference/groups/role

Carolinecarolingian answered 22/8, 2019 at 14:39 Comment(2)
Can we use google app scripts to completely independent web apps, deployed on non-google servers/cloud?Gatian
I would assume so. Unfortunately I do most of my work on Google Apps Scripts so not too sure about external app usage but it should just require Oauth. developers.google.com/apps-script/guides/web this might help also developers.google.com/apps-script/guides/services/…Carolinecarolingian

© 2022 - 2024 — McMap. All rights reserved.