0

Folks,

I am trying to figure out a way to get the list of the users that are using Google Drive for desktop in our Google workspace environment. Since there is no direct way of getting this information, i found an article online where one get this info by following the steps below:

  1. List all the users of your domain
    (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list)

  2. Check for each user, based on client id, what is the response received using tokens: get (https://developers.google.com/admin-sdk/directory/reference/rest/v1/tokens/get)

I was successful in getting the list of users but need help on how to get information around the token response for each user( I have the app client ID). Can someone help?

Kushal
  • 1
  • I'm not sure I understand what problem you're having. If you have the clientId and the user, what's stopping you from calling [tokens.get](https://developers.google.com/admin-sdk/directory/reference/rest/v1/tokens/get)? (the request would be `GET https://admin.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}`) Isn't the [response token](https://developers.google.com/admin-sdk/directory/reference/rest/v1/tokens/get#response-body) what you want to get? – Iamblichus Mar 30 '21 at 09:24
  • I am able to call this token individually for a user but was wondering how can i get it for all the users in the organization. – Kushal Mar 31 '21 at 14:44
  • Since you are able to retrieve all the users via `users.list`, you'd just need to iterate through all of those users and call `tokens.get` for each of them. What's stopping you from doing that? Do you have any code you're working on? If that's the case, can you provide it, so you can get further help? – Iamblichus Apr 01 '21 at 09:55

0 Answers0