<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00006v9PtiCAEOkta Classic EngineSingle Sign-OnAnswered2021-04-16T18:51:44.000Z2021-04-13T19:08:09.000Z2021-04-16T18:51:44.000Z

VeerendraB.56949 (Customer) asked a question.

How to trigger the SSO flow using okta from no-browser clients

We are using OKTA for SSO flows from browser.

This works fine.

We got new requirement to support this SSO flow from non-UI based flow.

To achieve this we have captured requests between OKTA and browser so that we can simulate the flow. In that process we are sending authentication request /api/v1/authn with required POST data but we are getting 400 bad reqeust.

 

<head><title>400 Bad Request</title></head>

<body>

<center><h1>400 Bad Request</h1></center>

</body>

</html>

 

There is not much useful data to understand the cause of the issue.

Can some one help whether it is allowed to send the request directly like this.


  • sandeepk.84743 (Wipro Technologies)

    Hi Veerendra,

     

    Can you check if you are passing following headers ?

     

    Accept : application/json

    Content-Type: application/json

     

    It should be simple username & password in the request body. Make sure that multiOptionalFactorEnroll should be set to true as shown below request body.

     

    {

      "username": "sandeep_khurana@live.com",

      "password": "XXXXXXXX",

      "options": {

        "multiOptionalFactorEnroll": true,

        "warnBeforePasswordExpired": true

      }  

    }

     

     

    Expand Post
  • VeerendraB.56949 (Customer)

    Thanks Sandeep for your help. It worked. I thought options are optional hence did not pass before.

This question is closed.
Loading
How to trigger the SSO flow using okta from no-browser clients