Posted on 11-28-2022 04:41 AM
Hello,
I search if somebody knows where these informations are written in the mac. I don't find command line or path to import it. My purpose is to create an extension attribute in JamfPro with these data.
If somebody could help me. :-)
Solved! Go to Solution.
Posted on 11-29-2022 08:56 AM
You can check out the
~/Library/Application\ Support/com.apple.NewDeviceOutreach/Warranty.plist
Posted on 11-28-2022 09:50 AM
I am sure there are people who know how to do this, but my assumption would be that this is solved by setting up the GSX integration in Jamf. It is basic info it pulls and it must be done manually but it does work.
Posted on 11-29-2022 08:56 AM
You can check out the
~/Library/Application\ Support/com.apple.NewDeviceOutreach/Warranty.plist
12-02-2022 03:06 AM - edited 12-02-2022 03:07 AM
Testing this prior to coding an EA. Ive noticed that on 'some' devices, the folder /com.apple.NewDeviceOutreach does not exist.. and of course then nor the plist.. when looking at system settings I see this dialog.. pretty sure no one has invoked this.. so do we know how this is created?
Posted on 12-02-2022 03:13 AM
@YanW Do you know how (and when) the folder /com.apple.NewDeviceOutreach is created ? I have the same issue, some computers don't have it. (and I don't know why... :-) ).
Posted on 12-02-2022 06:21 AM
I'm not sure either, hope someone can answer it. I found THIS which need a bit of work.
Posted on 12-01-2022 05:01 AM
Perfect ! I do two extension attributes. One for the status (covered or not) and another one for the expiration date. Thank you !
Posted on 08-30-2023 09:51 PM
I suspect the existence of the folder might only be available to the account first setup with the device. I am waiting to come across a device I can potentially identify this to be true.
if the were generate one with similar info under /library then this would be easier to code with.
Posted on 09-21-2023 12:32 PM
I believe the warranty.plist is created for any user who checks the warranty of the system from the system. They would browse to the warranty lookup Apple Portal and provide the systems serial number https://checkcoverage.apple.com/ whatever user is logged in will then have the warranty.plist written in the context of their login
Posted on 10-17-2023 06:43 PM
I have 510 reports of AC+ information now of 1400+ devices
I believe the reporting factor is actually who has an iCloud account signed in and who doesn't as I have checked coverage on a device that has no iCloud signed in and it would not report the information required. It's plausible that AC+ might have to be current for it to come through though.
Posted on 10-17-2023 06:53 PM
seems I also had to go to Apple > about this Mac > support tab for it to populate, but I am fairly confident that many of the examples I have would never had done that step, so quite possibly it could have generated this step on its own at some over stage.
I am keeping an eye out for devices from this point to see if they have iCloud signed in, as to confirm the main contributing factor.
Posted on 10-17-2023 07:08 PM
I worked up this, to run weekly for all devices devices but will only notify where the expiry occurs within 60 days (to compensate for our larger holiday periods) the AppleScript notification in there does need some pppc profile modification of security features for it to run and display a prompt.
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")
# Get the current date
current_date=$(date +"%Y-%m-%d")
# The date to check
date_to_check=$formattedTime
# Convert the dates to Unix timestamps
current_date_timestamp=$(date -j -f "%Y-%m-%d" "$current_date" +%s)
date_to_check_timestamp=$(date -j -f "%Y-%m-%d" "$date_to_check" +%s)
# Calculate the difference between the two dates in days
days_diff=$((($date_to_check_timestamp - $current_date_timestamp) / 86400))
# Check if the date to check is 30 days greater than the current date
if [[ $days_diff -ge 1 && $days_diff -le 60 ]]; then
# Report the date
echo "result: $date_to_check"
# Add debug print statements
# echo "current_date: $current_date"
# echo "date_to_check: $date_to_check"
# echo "date_diff: $date_diff"
# echo "days_diff: $days_diff"
fi
if [[ $days_diff -ge 1 && $days_diff -le 60 ]]; then
strmessage=""
# Discover logged in user
strmessage=$(sudo -u $3 /usr/bin/osascript << EOF
try
set theResponse to display dialog "Our Management Software has identified your AppleCare+ coverage for your Macbook, will expire:
$formattedTime
If there is any known damage or issues with your Macbook you want to address, we would encourage you to visit our IT Staff, to discuss your concerns, while the device is still eligible for AppleCare+.
Not All devices report their AppleCare+ and we encourage users to check their own AppleCare+ via https://checkcoverage.apple.com
This message will appear weekly Until your Coverage Expires.
ORGANISATION NAME" with hidden answer with icon note buttons {"Continue"} default button "Continue"
--> {button returned:"Continue", text returned:""}
return text returned of theResponse
end try
EOF)
fi