Hey Gang! Does anyone have any experience with get...
# community-help
r
Hey Gang! Does anyone have any experience with getting OAUTH tokens from JamF API?
a
the token will actually be at
jamf.body.token
i think
r
Oooooh, thanks @adventurous-manchester-53286! Out of interest for my learning, what makes you say that?
a
its been awhile since i looked at it so having a hard time remembering, but looking at the screenshot Jamf doesnt seem to conform to the normal client credentials or authorization code flow, they just want you to make a request for a token which the HRAC makes super easy
r
You da man! Thanks @adventurous-manchester-53286!!
I was trying to send a HTTP GET with B64 U:P but getting 401
a
so it worked for ya?
r
trying now
stupid Q - How do I test this?
Created the HTTP credential, first time I have used one
a
Copy code
{
  "url": "https://{{ .RESOURCE.jamf_url }}/uapi/v1/departments",
  "content_type": "json",
  "method": "get",
  "headers": {
    "Authorization": "Bearer {{ .CREDENTIAL.jamf }}"
  }
}
r
Sorry just got back
ahhh so my
run options
gets a
200 OK
.. but the
OAUTH token request Action
fails But in the
run options
I see the below as well as SAML requests
Copy code
Since your browser does not support JavaScript,↵ you must press the Continue button once to proceed
a
Sorry, not following the SAML part… Would you mind taking some screenshots of what you’re seeing?
r
sure
Will DM you
@adventurous-manchester-53286 you are awesome!! 😎