Reporting on Jamf Pro API Role permissions
Home > Jamf Pro, Jamf Pro API, Scripting > Reporting on Jamf Pro API Role permissionsRep 2026-8-12 15:47:0 Author: derflounder.wordpress.com(查看原文) 阅读量:2 收藏

Home > Jamf Pro, Jamf Pro API, Scripting > Reporting on Jamf Pro API Role permissions

Reporting on Jamf Pro API Role permissions

As part of reporting on Jamf Pro API clients and assigned API roles, I had previously written a script to report on the following information:

  •  The current list of the enabled and disabled API clients on a Jamf Pro server.
  •  Which API roles are being used by the API clients.

It later occurred to me that a more comprehensive report which includes the permissions assigned to the roles may be wanted, so I’ve now written a separate script which reports on the following:

  •  API Role Display Name
  •  API Role ID number
  •  API privileges assigned to the API Role.
  •  Which API Clients are assigned to each API Role and whether the API Client is enabled or disabled.

For more details, please see below the jump.

The script is named Generate_Jamf_Pro_API_Role_Privileges_Report.sh and is available via the link below:

https://github.com/rtrouton/rtrouton_scripts/tree/main/rtrouton_scripts/Casper_Scripts/Generate_Jamf_Pro_API_Role_Privileges_Report

This script connects to the Jamf Pro API on a Jamf Pro server and reports the API Roles, their assigned API privileges and which API clients (if any) are assigned to those API client roles.

Three items are required to use this script:

  • The URL of the appropriate Jamf Pro server.
  • An API client on the Jamf Pro server with sufficient privileges to read the necessary information from the Jamf Pro API.
  • The client secret for the relevant API client on the Jamf Pro server.

If setting up an API client with limited rights, here are the required API role privileges for the API client on the Jamf Pro server:

  • Read API Integrations
  • Read API Roles

You should see similar output to what’s shown below when using the Generate_Jamf_Pro_API_Role_Privileges_Report.sh script to generate a report:


username@computername ~ % /Users/Shared/Jamf_Pro_API_Role_Privileges_Report/Jamf_Pro_API_Role_Privileges_Report.sh
Please enter your Jamf Pro server URL : https://jamf.pro.server.here
Please enter your Jamf Pro API client ID : 88ab021a-6b2e-478e-ae57-7b2208664c7c
Please enter the API client secret for the 88ab021a-6b2e-478e-ae57-7b2208664c7c API client ID:
Report being generated. File location will appear below once ready.
Role Name Role ID Privilege Name Assigned API Client(s)
Create API Roles and Update API Roles 28 Create API Roles 125ed256-21e1-42b6-bb77-afe3c917a940 (Disabled)
Create API Roles and Update API Roles 28 Update API Roles 125ed256-21e1-42b6-bb77-afe3c917a940 (Disabled)
Read Computers API Role 29 Read Computers 47da63c0-1386-4c55-851b-cc0098621f26 (Enabled)
Read API Roles and API Integrations 30 Read API Integrations 88ab021a-6b2e-478e-ae57-7b2208664c7c (Enabled)
Read API Roles and API Integrations 30 Read API Roles 88ab021a-6b2e-478e-ae57-7b2208664c7c (Enabled)
Create Computers API Role 31 Create Computers (No API Client assigned)
Report available here: /var/folders/ps/2_yw29gj711c9d7c5w5jhyv80000gp/T/tmp.OG0uCcS4CL.tsv
username@computername ~ %

As part of the script’s run, a report will be generated and you’ll be notified of where it is stored. The report will be in TSV format and appear similar to what’s shown below:


Role Name Role ID Privilege Name Assigned API Clients
Create API Roles and Update API Roles 28 Create API Roles 125ed256-21e1-42b6-bb77-afe3c917a940 (Disabled)
Create API Roles and Update API Roles 28 Update API Roles 125ed256-21e1-42b6-bb77-afe3c917a940 (Disabled)
Read Computers API Role 29 Read Computers 47da63c0-1386-4c55-851b-cc0098621f26 (Enabled)
Read API Roles and API Integrations 30 Read API Integrations 88ab021a-6b2e-478e-ae57-7b2208664c7c (Enabled)
Read API Roles and API Integrations 30 Read API Roles 88ab021a-6b2e-478e-ae57-7b2208664c7c (Enabled)
Create Computers API Role 31 Create Computers (No API Client assigned)

文章来源: https://derflounder.wordpress.com/2026/08/12/reporting-on-jamf-pro-api-role-permissions/
如有侵权请联系:admin#unsafe.sh