Posted on 01-10-2023 07:44 AM
Hi, is there a CLI from MacOS client to fetch the Room info under Inventory/User and Location/Room?
Posted on 01-10-2023 07:52 AM
This can be read via the Jamf Pro API from the device inventory record.
Posted on 01-10-2023 08:56 AM
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.
Posted on 01-11-2023 07:21 AM
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