Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/07/2024 11:11 AM
Hello!
We are configuring Rest connection (authtype: oauth2). The connection is failing with the following error message:
java.lang.NullPointerException: Cannot get property 'origUrl' on null object at com.saviynt.provisoning.rest.RestProvisioningService.populateHttpParams(RestProvisioningService.groovy:3464) at com.saviynt.provisoning.rest.RestProvisioningService.testConnectionRest(RestProvisioningService.groovy:11016) at com.saviynt.ecm.integration.ExternalConnectionCallService.testExternalConnection(ExternalConnectionCallService.groovy:948) at TestConnectionsJob.testConnection(TestConnectionsJob.groovy:123) at TestConnectionsJob$_execute_closure2.doCall(TestConnectionsJob.groovy:62) at TestConnectionsJob.execute(TestConnectionsJob.groovy:60) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
The application/endpoint is configured in such a way that one has to generate the access token and use it to call relevant API methods using the generated access token. We have created the following connectionjson to generate the access token and connect with the endpoint:
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://ssodev.wbd.com/oauth2/xxx/v1/token",
"httpMethod": "POST",
"httpParams": {
"grant_type": "password",
"scope": "openid email groups",
"client_secret": "xxxx,
"username": "xx",
"client_ID": "xx",
"password": "xx"
},
"httpContentType": "application/x-www-form-urlencoded-pws",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"USER_AUTHENTICATION_FAILED",
"PARTNER_AUTHENTICATION_FAILED",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"errorPath": "errorCode",
"maxRefreshTryCount": 5,
"tokenResponsePath": "id_token",
"authHeaderName": "Authorization",
"tokenType": "Bearer",
"retryFailureStatusCode": [
401,
402,
403,
404,
405,
500
],
"unsuccessResponses": {
"statusCode": [
500,
400,
401,
403,
404,
405,
409
]
},
"accessToken": "Bearer abc"
}
}
}
Is there any issue with this connectionjson? Please advise!
08/07/2024 12:19 PM
Hi @LoneWolf2020 , can you share curl command from postman to get token.
08/07/2024 06:04 PM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️