User and location history

Andy_McCaskill
Contributor

I was wondering if there is a way to check all devices User history to search for a specific user has ownership of managed devices? I see how to look it up within each device but I need to query all devices to see what devices a user has had.

5 REPLIES 5

bpavlov
Honored Contributor

So immediately the first thing that comes to mind is that if you could do this it would probably have to be through the API. But looking at the API (and I'm not as well versed as others), but I don't see where that information would be kept if its available at all. But if it were, I'd envision a script that would pull the data of all the computers (maybe a loop that goes through all computers) and then would scrape all the data of each computer for that particular user and if found write out the computer ID to a separate file. Easier said than done. Hopefully that info is available via the API. Otherwise if you really want it then perhaps you might need to look at the database where surely it'll be available.

Andy_McCaskill
Contributor

The information is stored within JSS under the device details. Go to History tab on the top, then user and location history on the left. So this is stored on the JSS database, just need a way to query the information.

Have you find the solution? I'm also looking for a way to get computer's username (owner) from JAMF SQL DB directly via SQL Query, however I'm not sure I can get it from a single table or from a group of tables somehow ...

bpavlov
Honored Contributor

I'm aware it's in the database. I just don't know if you'd be able to access it via the API which would be the preferred method to do it. There's a lot in the database that isn't available in any easily searchable within the JSS and/or API. One of the pain points with Casper.

mm2270
Legendary Contributor III

Nothing under the "History" tab in a computer's details is available thru the API. It holds true for all of it there. User and Location, Hardware/Software, Application Usage, the whole lot. Its all in the db of course for whatever good that does anyone, but none of this is exposed in the API, which is unfortunate. I really do wish JAMF would get around to adding all these things in so we can do more with the API.