How to list all users of G-Suite without client secret but with admin user consent?

34 views
Skip to first unread message

Chiranjib Karn

unread,
Nov 27, 2017, 9:22:19 AM11/27/17
to google-api-java-client
My SaaS web application is in Grails 3, which has requirement to fetch user list of clients from their G-Suite account.
I am using following java libraries: 
"google-api-client", "google-oauth-client-jetty", "google-oauth-client" and "google-api-services-admin-directory".
I have managed to get the list of users using google SDK with "https://www.googleapis.com/auth/admin.directory.user.readonly" scope from a given G-Suite account, which is the expected behavior. 
But for that I have to use "client_secret", which is not feasible to obtain from all of my clients as it involves manual work. Is there any way around to get list of users without client_secret but need admin user consent?

Matthew Whisenhunt

unread,
Nov 27, 2017, 12:11:51 PM11/27/17
to google-api-java-client
It sounds like this https://developers.google.com/admin-sdk/directory/v1/guides/delegation is what you are looking for.
Reply all
Reply to author
Forward
0 new messages