Run policy through API?

jephsa
New Contributor II

Hello all,

We want to provide an action to all our IT helpdesk teams that they should run on the user's Mac before a support incident is sent to a dedicated Mac support team. They  don't always have physical access to the Mac and won't have access to the JAMF Console.

 

Is it possible to run a policy on a managed Mac through an API call ?

The policy itself is very simple: it only contains the "Update Inventory" command and the scope is set to all computers, so there's no requirements on scope or possible issues on exclusions. 

I could not find any API action on policies to do that..

1 ACCEPTED SOLUTION

AndrewNe
New Contributor II
New Contributor II

Hi @jephsa,

Thanks for posting on Jamf Nation. The Jamf binary on the managed computer is going to be initiating the call for the policy, this is not something that can be triggered via the API. Most customers opt to have a policy in Self Service which they would direct the end-user to click to initiate an Inventory Update. I would recommend this workflow for its simplicity, ease of use, and it empowers users to be part of the solution for fixing their issues.

Hope this helps!

View solution in original post

4 REPLIES 4

AndrewNe
New Contributor II
New Contributor II

Hi @jephsa,

Thanks for posting on Jamf Nation. The Jamf binary on the managed computer is going to be initiating the call for the policy, this is not something that can be triggered via the API. Most customers opt to have a policy in Self Service which they would direct the end-user to click to initiate an Inventory Update. I would recommend this workflow for its simplicity, ease of use, and it empowers users to be part of the solution for fixing their issues.

Hope this helps!

karthikeyan_mac
Valued Contributor

Hi @jephsa JAMF does not have any API to trigger the policy.

Workaround: API to add the computer to a static group which is scoped to a policy triggered by Check-in with Ongoing frequency. The policy will run when the device next check-in to Jamf which depends on your check-in frequency settings. 

I would agree with @AndrewNe about the Self Service policy.

Thanks

 

jamf-42
Valued Contributor II

Self Service is one option.. We also have a recon policy with trigger startup.. so all the user does is reboot.. 

jephsa
New Contributor II

Thanks for your answers.

We already have such item in Self Service, so we'll keep asking end-users to run it :)

Best regards,

jp