chrisgzim / Jamf-API-Recovery-Lock-by-Group

MIT License
6 stars 1 forks source link

Unclear on API Username and API Password requirement #5

Closed LinkNeb closed 3 months ago

LinkNeb commented 4 months ago

What exactly are you asking for in the swiftdialog for the API Username and API Password? I used the Client ID and the Client Secret and that did not work.

Does this support the Pro API or only Classic API?

Does the field for Managed Computers represent the whole number of Managed Macs in our Jamf Pro or is it the number of Macs without recovery lock?

Thank you!

chrisgzim commented 4 months ago

Hey @LinkNeb! It's asking for the API User and Password. I haven't made this to support using API Roles and Clients at this time. But I can add that to the list of things I need to change here.

This is also not working as I need to update the API endpoint for Bearer Tokens for Jamf Pro versions of 11.5 or greater for the Classic API piece.

The way this workflow works is as follows:

  1. It grabs all of your managed computers in your environment -- assuming the number is correct -- and gets their Management ID and puts it on a csv file. (serial,managementID)
  2. It will then either look up a smart group or an individual > the group lookup for computer serial numbers is in the Classic API. Those serial(s) are put in an array for the next piece.
  3. The script will then match the serial(s) to the csv file that contains both the serial and the managementID to find the managementID for the MDM Command > The MDM Command uses the Jamf Pro API
  4. Once the ManagementIDs are figured out, it will then loop through all of the managementIDs and send the recoveryLockPassword command to those endpoints.
  5. This should also delete the csv of all of those computers as well.