Jamf Pro Executor¶
Category: Asset Inventory and Network Management
Script: jamf_pro.py
Integration: REST API (OAuth2)
Faraday Plugin: Raw JSON
Website: https://www.jamf.com/products/jamf-pro/
Description¶
Imports the managed Apple devices (macOS computers and iOS, iPadOS and tvOS mobile devices) from a Jamf Pro tenant into Faraday as an asset inventory. Each device becomes a host with one informational entry that carries its Jamf details.
Prerequisites¶
- A Jamf Pro tenant reachable from the agent
- A Jamf Pro API client (client ID and secret) whose API role can read computers and mobile devices. Create it under
Settings > System > API roles and clients.
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
JAMF_HOST |
Yes | Jamf Pro host (e.g., mycorp.jamfcloud.com). https:// is added if missing. |
JAMF_CLIENT_ID |
Yes | API client ID |
JAMF_CLIENT_SECRET |
Yes | API client secret |
JAMF_PAGES |
No | Maximum number of pages (100 computers each) to read from the modern computers API, from 1 to 50 (default: 5) |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
JAMF_DEVICE_TYPE |
string | No | Devices to import: computer, mobile or both (default: both) |
YAML Configuration Example¶
executors:
jamf_pro:
repo_executor: jamf_pro.py
max_size: 65536
varenvs:
JAMF_HOST: "mycorp.jamfcloud.com"
JAMF_CLIENT_ID: "<jamf_client_id>"
JAMF_CLIENT_SECRET: "<jamf_client_secret>"
params:
JAMF_DEVICE_TYPE:
mandatory: false
type: string
base: string
How It Works¶
- Requests an OAuth2 access token from
{JAMF_HOST}/api/oauth/tokenwith the client credentials flow - For computers, reads
GET /api/v1/computers-inventory(100 per page) andGET /JSSResource/computers, and merges both lists by computer ID - For mobile devices, reads
GET /JSSResource/mobiledevices - Creates one host per device: IP, hostnames (name, model, serial number), MAC address and operating system come from the Jamf record
- Adds one vulnerability to each host with severity
info. It holds the Jamf ID, UDID, serial number, model, last contact, user, department, building and site as references.
Notes¶
- The vulnerabilities are inventory entries, not security findings. Their severity is always
info. - If a device has no usable IP (loopback and
0.0.0.0are ignored), the host IP is0.0.0.0. - If
JAMF_DEVICE_TYPEis invalid, the executor imports both computers and mobile devices and writes a warning to the log. - By default at most 5 pages of 100 computers are read from the modern API. Set
JAMF_PAGES(1 to 50) to change it. - The setup variables can also be passed as execution arguments.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor.