Oauth 2.0 webservices connection failing to generate token

Having some issues setting up a OAuth 2.0 connection with the Web Services connector. Keeps throwing the following error:

“Exception occurred in Test Connection. Error: Exception occurred while generating access token: Unable to generate access token. Response returned: java.net.SocketException: Connection reset”

in PostMan and our other automation engine (Okta Workflows), everything works but not sure how Sailpoint ISC is sending the token request that it keeps erroring. I’m doing the following:

  • grant type: client_credentials
  • client_id: client ID
  • client_secret: client_secret
  • oauth request parameters: i used a “audience” key and a value our devs gave me

In the HTTP Operations page I have the following:

  • 3 header key/value pairs according to what our devs gave me

I dont see any difference between the Postman and Sailpoint setup, not sure why Sailpoint keeps throwing a connection reset error.

Hey Lia, I saw this thread about a similar issue in IIQ, Message: java.net.SocketException: Connection reset, HTTP Error Code: 0

Another thing which might be worth looking into is seeing if any of the auto generated headers in Postman is missing in the call which ISC is making. Not sure about the Socket Exception but i have had similar issues where the API call wasnt working in ISC because of some missing header which is usually auto generated in Postman

@lcha1 you need to upload the certificate of the application in the virtual appliance certificate folder .another option you can try is to run the curl directly in the va and check if it works there or not .If you are getting SSL error there also you can connect with your network team to allow this url from the VA

Hmmm I don’t think so. In Postman and Okta Workflows, we’re not doing any SSL cert validation and it works fine.

Yeah I saw that article and did try some of the things in there but it didn’t work. For some reason Postman console is not logging anything I do so I can’t verify what headers are being created/sent. I checked the headers section in the call and used the usual “content-type”, “authorization” etc etc but still doesn’t work.

hi @lcha1,
Instead of using OAuth 2.0 as the authentication type use “Custom Authentication”

In the Http Operations create a operation called Custom Authentication using “Custom Authentication” as operation type. Also make this as the first operation

Now give these details

In the body provide your grant type, client id and secret and audience

In the Response Information put Root Path as $ and success codes as 2**
Finally in the response mapping map the accesstoken

I hope this works for you.

1 Like

@lcha1 can you share your connection setting screenshots? We can help you then