Skip to main content
Question

JAMF School APi

  • January 5, 2023
  • 2 replies
  • 14 views

Forum|alt.badge.img+1

I am looking at wanting a Powershell script to access the JAMF School API to pull a list of devices and their WiFi Mac addresses.

Any hints or directions for a start with he JAMF API?

2 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2802 replies
  • January 5, 2023

All of JAMFs documentation will be in bash/zsh. If you are admining Apple products, its best to use a Mac. If you must use powershell, you will need to convert the commands JAMF gives you.

JAMF 300 goes in to API a little bit, and would be a good place to start. I you have access to JAMF training there is also some stuff in there.

 

Jamf 300 Course - Course Resources | Jamf

 

To pull all the device records you would use curl -X GET "https://{path to server}JSSResource/mobiledevices" -H "accept: application/xml" -H "Authorization: Bearer {long token here}. If I am not mistaken CURL would be invoke-webrequest in powershell, but its been a very long time and I am very rusty with powershell. Once you have the data just filter out the information you want.


Forum|alt.badge.img+7
  • Contributor
  • 39 replies
  • January 19, 2023

 

With this python program you can get this WiFi MAC address list. https://github.com/heinrich-foto/jamf_api