Major shoutout to Ben Toms from the MacAdmins Slack for pointing out what the issue is.
The exact error message
If you have a script that doesn’t return the actual response but just gives you an error code, you may get an error code of 409. If you Google something like 409 conflict jamf api, you’ll get a whole bunch Jamf Nation threads indicating that the 409 error comes up because your Jamf API account doesn’t have the correct permissions or you’re trying to update something to have the same name as some other thing (policy, profile, etc.).
If you run a direct
curl command, though, you may get something like this back:
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Conflict</p>
<p>Error: Duplicate alternate MAC address</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
This may come up if you have several virtual machines you run from a single host Mac, for example.
Real Solution (hasn’t happened as of this writing)
The real solution is for Jamf to acknowledge and fix Allow API update of records with duplicate Serial, MAC etc. In the meantime, you can log into Jamf Nation and upvote that feature request.
Workaround in the Meantime
The record that fails is likely the one with the duplicate alternate MAC address, so you can get it from the individual record (Inventory > Hardware > Secondary MAC Address:). Then, go to Settings > Computer Management > Removable MAC Addresses and add it as a MAC address to ignore when identifying computers.
The effect may not be instant—you may have to wait a few minutes. You could also just manually delete the MAC addresses, but they may also come back after the “offending” Macs do another Jamf inventory. Still, it may be worth a temporary deletion, just to see if that resolves the issue for your Jamf API script.