

# Remove the trailing slash from the Jamf Pro URL if needed.Įcho "Report being generated. Jamf Pro API and Apple's Swift: Building the SwiftUI App Jamf Blog Maby Armin Briegel Use Swift with the Jamf API, Part 5: Build the app Jamf Pro In the previous parts of this series, we built a command line tool that gathered data using the Jamf API.
#Jamf pro api password
Read -p "Please enter the password for the $jamfpro_user account: " -s jamfpro_password Read -p "Please enter your Jamf Pro user account : " jamfpro_user Read -p "Please enter your Jamf Pro server URL : " jamfpro_url # otherwise, you will be prompted to enter the requested URL or account credentials. # If the Jamf Pro URL, the account username or the account password aren't available If [[ $(/usr/bin/sw_vers -productVersion | awk -F. # Use user account's username and password credentials with Basic Authorization to request a bearer token. # This function uses Basic Authentication to get a new bearer token for API authentication. # Jamf Pro URL for the computer inventory record # If FileVault personal recovery key is available Create a report in tab-separated value (.tsv) format which contains the following information Runs a separate API call to retrieve the following in JSON format. Pulls the following information out of the inventory entry:
#Jamf pro api download
Uses the Jamf Pro API to download information about the matching computer inventory record in XML format. Uses the Jamf Pro API to download all information about the matching computer inventory record in XML format. # Once the Jamf Pro ID numbers are read from in from the plaintext file, the script takes the following actions: # Usage: /path/to/generate_filevault_recovery_key_report_from_jamf_pro_id_numbers.sh jamf_pro_id_numbers.txt # and uses that information to generate a report about the matching computers' # This script imports a list of Jamf Pro ID numbers from a plaintext file tsv format will contain information similar to what’s shown below: Manage the GlobalProtect App Using Jamf Pro Create a Smart Computer Group for GlobalProtect App Deployment Create a Single Configuration Profile for the.

Uses the Jamf Pro API to download all information about the matching computer inventory record in XML format.Ģ. Once the Jamf Pro computer ID numbers are read from in from the plaintext file, the script takes the following actions:ġ. path/to/generate_filevault_recovery_key_report_from_jamf_pro_id_numbers /path/to/jamf_pro_id_numbers.txt Jamf has a number of API options to use when scripting. To store the Jamf Pro URL in the plist file: Scripting with the Jamf Pro API Jamf Scripting with the Jamf Pro API Ideal for Commercial and Education audiences.
#Jamf pro api manual
If setting up a specific Jamf Pro user account for this purpose with limited rights, here are the required API privileges for the account on the Jamf Pro server:įor authentication, the script can accept manual input or values stored in a ~/Library/Preferences/ file. The plist file can be created by running the following commands and substituting your own values where appropriate: tsv format.įor more details, please see below the jump. Return paginated FileVault information for all computers: įor those who want to use this new capability, I’ve written a script which uses the Jamf Pro Classic API and Jamf Pro API to take a list of Jamf Pro computer IDs from a plaintext file, retrieve the associated Macs’ FileVault personal recovery keys and generate a report in.Return FileVault information for a specific computer:.Maybe I can write on that sometime soon.As part of Jamf Pro 10.43’s release, Jamf has added the ability to access and retrieve FileVault personal recovery keys via the Jamf Pro API: I should note that my API scripts from here on out will be utilizing bearer token authentication, since this is going to be required going forward with Jamf Pro sometime in the fall. Also, if this is a process that needs to be run on any recurring basis, saving it in a script makes the process nice and easy to repeat. This way, I can write notes or whatever else I want in the spreadsheet and then submit it to the higher ups easily. I figured I could just go look in Jamf Pro, write down the names of the accounts and their access summary, but what fun is that? Instead, I wrote up a script that outputs a CSV of all of the user accounts and some of their attributes. I was recently asked by my security team to perform an audit and produce a report of user accounts present in Jamf Pro. Since my last post, I received my Jamf Pro 400 certification! Woohoo! I haven’t posted in a while due to being rather busy.
