SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
235 stars 67 forks source link

"Company owned" devices are not reported #291

Closed lucafabbri365 closed 4 years ago

lucafabbri365 commented 4 years ago

Hello, I noticed the Get-GSMobileDevice doesn't report the list of devices registered as company owned. It is the same behavior while using Google tool Try this API at the link Mobiledevices: list, using the filter:

Note: "query" field syntax is provided by Use search operators to find devices > Company-owned device search operators section

So the question is: how is it possible Google isn't allowing company owned devices to be searched via API ? I cannot believe that. So, what did I miss ?

Thank you, Luca

scrthq commented 4 years ago

Hey @lucafabbri365 - How are you currently determining if a device is company owned or not in the Admin Console? We use MDM, but primarily for device policy enforcement on BYOD mobile devices, so I honestly haven't used the APIs or the UI for searching for company-owned devices. It seems like you're getting the same results though when using the API Explorer as you are with PSGSuite, so I'm wondering if this would be a better question for Google / the team that supports that API?

lucafabbri365 commented 4 years ago

Hello @scrthq, in Admin Console the "Ownership" column identifies if a device is "User owned" (BYOD) or "Company owned". Company devices are those registered under Device management > Company owned inventory section. As I can see it's a Google API limit and, to be honest, it doesn't make any sense to me: a mobile device, is a mobile device either company owned or user owned; so why an API with generic name Mobiledevices should return user owned only devices and not company owned ?

I'm waiting for a Google's support answer.

Bye, Luca

lucafabbri365 commented 4 years ago

Hello @scrthq, I'm going to close the issue because not related to PSGSuite.

Bye, Luca