Accessing deep links with a script while Okta SSO is enabled

adayne
New Contributor II

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&#x3a;&#x2f;&#x2f;example.okta.com&#x2f;app&#x2f;jamfsoftwareserver&#x2f;[redacted]&#x2f;sso&#x2f;saml" method="post">
            <div>
<input type="hidden" name="RelayState" value="&#x2f;iOSConfigurationProfiles.html&#x3f;id&#x3d;10&amp;o&#x3d;r&amp;side-tabs&#x3d;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?

0 REPLIES 0