Jamf Pro – Get Mac Warranty Information

Over the past few weeks I’ve been asked multiple times on a way that we can get an insight on our computer’s warranty expirations. This is helpful information to plan out a computer refresh cycle and to have good observability on the status of your fleet.

To date, I’ve been working on getting some processes in place similar to using the GSX integration within Jamf Pro to help obtain this information and automatically get it into the inventory of our Jamf Pro enrolled computers. This has been a lengthy process and is not yet complete.

As I was browsing through the #jamfnation channel on MacAdmins slack, I noticed a question that mentioned a plist located on a computer called Warranty.plist. As soon as I saw this I went to investigate what is stored in the plist as I had no idea it was even there. Upon looking through the preferences file, I saw the key coverageEndDate. This was the key I needed which could be extracted using a defaults read command. Now that we know we can get the information, the easy part came to build an extension attribute that can populate our computer’s inventory record with the coverage end date located in the file. Below is the EA that I have created to grab the required information.


# This EA will grab the current logged in user and find the Warranty plist
# This is useful to grab the coverageEndDate key from the plist and provide 
# a date in which warranty coverage should be ending
# Created 07.12.2023 @robjschroeder

# Get the current logged in user
loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name / { print $3 }' )
# Find the coverage end date key in Warranty.plist
coverageEndDate=$( /usr/bin/defaults read /Users/$loggedInUser/Library/Application\ Support/com.apple.NewDeviceOutreach/Warranty.plist coverageEndDate )
# Format the EPOCH time to something readable
formattedTime=$(date -jf %s $coverageEndDate "+%F %T")

echo "<result>$formattedTime</result>"

exit 0

When adding this EA to Jamf Pro, it is recommended that the data type be switched to date. This will help to create Smart Groups that can use the operators that use the date data type.

With this EA, I’ve created reports to show all computers that have a coverage end date of more than 1 day ago. With this new information we can start planning hardware refreshes on devices that are no longer covered under warranty.

I will continue to browse this warranty.plist file to look for any important information that I can use for reporting on our hardware.

Note: In testing, this is working on Apple Silicon Macs. On Intel Macs, it doesn’t look like this plist (or at least not in this directory) exists.

I hope this information is helpful to you as much as it was to me. Thanks for checking it out!

Leave a Reply

Blog at WordPress.com.

%d bloggers like this: