<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
0D54z0000A5GfxRCQSOkta Classic EngineAPI Access ManagementAnswered2024-04-30T17:57:26.000Z2024-04-04T12:38:11.000Z2024-04-30T17:57:26.000Z
/api/v1/users endpoint is returning HTTP400

Hello,

I am using the API to create user and since a few day, the API in not behaving as expected. My code hasn't change and the thrown exception mention a 400 http return code. For troubleshooting, I retried with the postman collection and I got the following error:

{

    "errorCode": "E0000022",

    "errorSummary": "The endpoint does not support the provided HTTP method",

    "errorLink": "E0000022",

    "errorId": "hidden",

    "errorCauses": []

}

 

Any expected service disruption or change in the API?

Thanks and regards,

Fabien


  • TimL.58332 (Workflows)

    Hi Fabien,

     

    400 = Bad request which likely means one of your changes broke something in the structure of the request. This could be as simple as missing a single "," character. Typically (at least with Okta) the 400 errors provide additional context as to what is broken.

     

    I would first make sure your auth is functioning fine by just doing a simple GET method to /api/v1/users/me

     

    This won't have any sort of body portion to send (will have a body response) but will let you know if you have at least "read" access. Keep in mind to do POSTs/PUTs etc you need "manage" access. If you are leveraging a Super Admin created API token this will definitely have the required scopes.

     

    Header: Authorization : SSWS apiTokenValue

     

    Expand Post
    Selected as Best
  • TimL.58332 (Workflows)

    @User16552989370305796596 (Customer)​ - USERS endpoint is very likely the most utilized endpoint in Okta. It is leveraged by the Okta Admin UI and likely every other tool/integration out there. All of Okta would be down if this endpoint were broken.

     

    There error specifically indicates a problem with the METHOD being used and you haven't disclosed which METHOD is being used.

     

    Additionally, knowing the specific API call you are making (what API documentation was followed in your initial setup) would be helpful.

    Expand Post
    • Hi Tim,

      Thanks for your reply. I am using POST method has preconfigured in the postman collection from Okta.
      I did not change a lot except the body where I just adapted the values...

      Kr,
      Fabien
      Expand Post
      • TimL.58332 (Workflows)

        Hi Fabien,

         

        400 = Bad request which likely means one of your changes broke something in the structure of the request. This could be as simple as missing a single "," character. Typically (at least with Okta) the 400 errors provide additional context as to what is broken.

         

        I would first make sure your auth is functioning fine by just doing a simple GET method to /api/v1/users/me

         

        This won't have any sort of body portion to send (will have a body response) but will let you know if you have at least "read" access. Keep in mind to do POSTs/PUTs etc you need "manage" access. If you are leveraging a Super Admin created API token this will definitely have the required scopes.

         

        Header: Authorization : SSWS apiTokenValue

         

        Expand Post
        Selected as Best

Loading
/api/v1/users endpoint is returning HTTP400