Skip to main content
Solved

Query computer for locked or unlocked state

  • February 15, 2023
  • 2 replies
  • 19 views

Forum|alt.badge.img+4

Is there a way we can query a computer for its locked or unlocked state? I'm familiar with endpoints to get the command status...

  • /JSSResource/computerhistory/id/{id}/subset/commands
  • /JSSResource/computercommands/name/DeviceLock

...but neither of these tell me if the device has been unlocked after it was successfully locked

Best answer by thomasshouler

I don't know of a way to check for this state.

Truthfully though, if a device is checking in to Jamf, then it would have to be unlocked, since the nature of a locked machine is that it's not usable and wouldn't have a network/internet connection to even be able to check into Jamf Pro.


Thanks! After playing with the APIs a bit more, I noticed there's a ProfileList command that's issued immediately after a computer is unlocked. If anyone else wants to assert something similar, you can see the pattern via this endpoint: /JSSResource/computerhistory/id/{id}/subset/commands

2 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • 7886 replies
  • February 15, 2023

I don't know of a way to check for this state.

Truthfully though, if a device is checking in to Jamf, then it would have to be unlocked, since the nature of a locked machine is that it's not usable and wouldn't have a network/internet connection to even be able to check into Jamf Pro.


Forum|alt.badge.img+4
  • Author
  • New Contributor
  • 1 reply
  • Answer
  • February 16, 2023

I don't know of a way to check for this state.

Truthfully though, if a device is checking in to Jamf, then it would have to be unlocked, since the nature of a locked machine is that it's not usable and wouldn't have a network/internet connection to even be able to check into Jamf Pro.


Thanks! After playing with the APIs a bit more, I noticed there's a ProfileList command that's issued immediately after a computer is unlocked. If anyone else wants to assert something similar, you can see the pattern via this endpoint: /JSSResource/computerhistory/id/{id}/subset/commands