Posted on 05-26-2022 11:37 AM
I wrote a script that follows @BrysonTyrrell's method to access Jamf resources that are not exposed by the API as explained on his blog: https://bryson3gps.wordpress.com/2016/11/15/scripting-the-stuff-that-you-think-is-only-in-the-jss-gu.... It works very well, and I want to begin using it in production to save me a LOT of manual clicking to capture a monthly list of data values unavailable to the API.
Unfortunately, I am running into a problem in a dev environment where Okta SSO is enabled. Instead of returning the requested resource, I hit an Okta redirect page:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
</head>
<body onload="document.forms[0].submit()">
<noscript>
<p>
<strong>Note:</strong> Since your browser does not support JavaScript,
you must press the Continue button once to proceed.
</p>
</noscript>
<form action="https://example.okta.com/app/jamfsoftwareserver/[redacted]/sso/saml" method="post">
<div>
<input type="hidden" name="RelayState" value="/iOSConfigurationProfiles.html?id=10&o=r&side-tabs=General"/>
<input type="hidden" name="SAMLRequest" value=redacted/>
</div>
<noscript>
<div>
<input type="submit" value="Continue"/>
</div>
</noscript>
</form>
</body>
</html>
I've seen this in a browser before and can simply click the "Continue" button to get to the requested resource, but I don't know how to do that with my script. Has anyone else run into this?