commandline to read the Room info?

New Contributor

Hi, is there a CLI from MacOS client to fetch the Room info under Inventory/User and Location/Room?


Release Candidate Programs Tester

This can be read via the Jamf Pro API from the device inventory record.

Contributor III

If you didn't want to use the API, you could use a given group membership to run a policy writing the value out to a temp file on each device, then read it as needed.

Valued Contributor

You can also store this information on the machine directly via a configuration profile.  The upside is you can just read from that, which gets around any need for API credentials.  The downside is that config would not update dynamically.  You'd have to set up a scoping that makes sure it gets removed should the building/room info need to change.

Here's the link to the page in Jamf's documentation that covers configuration profile payload variables