1

I'm trying to get a list of all mobile devices from G Suite Admin in a python script using guide. But in response, I only get a list of devices owned by users, not the company. I marked the device's return in green on the screenshot. screen

Previously, I created a project in Google Cloud, connected the admin SDK API to it, and created a service account. For the account I enabled data access delegation in the G Suite domain, which created an oauth 2.0 client ID for me. Also in G Suite in the security settings I added access for this account to scope https://www.googleapis.com/auth/admin.directory.device.mobile.

I don 't use the google library. Using it, I couldn 't bypass the proxy server.

I use the library Requests to access the server. Here is an approximate algorithm of my actions:

But I don't get all the necessary devices. How can I get devices that are owned by an organization?

1 Answers1

0

With https://developers.google.com/admin-sdk/directory/v1/reference/mobiledevices/list you can only see devices assigned to an account:

The one you specify with the paramter customerId - see here.

Unfortunately the API does not have an endpoint to list devices belonging to the company, i.e. unassigned devices.

Community
  • 1
  • 1
ziganotschka
  • 25,866
  • 2
  • 16
  • 33