GAM Query by Org Unit

826 views
Skip to first unread message

tcarter0

unread,
Mar 21, 2017, 3:08:08 PM3/21/17
to GAM for G Suite
Running GAM 4.1.2. I know I've done this before, and either I'm having a mental lapse, or something isn't working. I need to get a list of ChromeOS devices in a specific org unit. Shouldn't this work?

gam print cros query orgUnitPath=/name_of_ou

Doesn't even work for root with just orgUnitPath=/

What does work for root is this:

gam print cros query org=/

But gam print cros query org=/name_of_ou does not work

Why does /org work only for root, and orgUnitPath doesn't work for anything? Tried those variations with single and double quotes:

gam print cros query "org=/name_of_ou"
gam print cros query 'org=/name_of_ou'
gam print cros query "orgUnitPath=/name_of_ou"
gam print cros query 'orgUnitPath=/name_of_ou'

Also tried with just the org value itself in single and double quotes. Also tried with the older syntax that's still in the documentation in some places, like query:orgUnitPath
I can do this: 

gam print cros full query serial_number

and get the full info for one of the devices in the org, and that info shows the field name as orgUnitPath and the value as /name_of_ou

So I'm putting it in the query the same way that it's given to me in GAM print output.

Jay Lee

unread,
Mar 21, 2017, 3:20:42 PM3/21/17
to google-ap...@googlegroups.com
No, unfortunately there's no CrOS filter for OrgUnits. The query language is the same as it is in the CPanel:


Best you can do is print all devices to a text file and then filter locally.


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/898bc522-20fa-41a0-865c-284a8d7756e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tcarter0

unread,
Mar 21, 2017, 3:29:25 PM3/21/17
to GAM for G Suite
Great, so you're saying it was a mental lapse. :-)

Google might consider making the filtering consistent. Filtering by org unit seems like a typical thing that people would want to do, and it is possible through the UI.

Thanks,
Tommy

Graham Ingleby

unread,
Mar 22, 2017, 5:48:09 AM3/22/17
to GAM group
Assuming you are a Google Customer (I guess everyone here is) then you can log this as a Feature Idea in Google Cloud Connect (GCC) which is at connect.googleforwork.com, register with your G Suite acocunt and you should see the Feature Ideas link, then you can add your idea and vote for your idea and others you may find useful


This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. Ancoris reserves the right to monitor all e-mail communications through its networks. Ancoris Limited, Registered in England Number: 04830784, Registered address: 5a Frascati Way, Maidenhead, Berkshire SL6 4UY. Trading Address: Lily Hill House, Lily Hill Road, Bracknell, Berkshire RG12 2SJ




Reply all
Reply to author
Forward
0 new messages