Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2024 04:34 AM
Hi Team,
We have Oauth2.0 authentication to generate access_token for EC_NOV application. When we run the job to import account, we are getting 401 error. I have raised a ticket before for the same https://forums.saviynt.com/t5/identity-governance/rest-connector-token-is-not-re-generated-after-it-...
Connection Json :
Solved! Go to Solution.
04/15/2024 07:50 PM
Hello @nbillu,
Could you please share the Postman Screenshot and also where are you passing the username and password, as i dont see in the previous fourm post, are the both same application.
Can you please enable the showlog= true and share the logs.
And also confirm which application you are trying to connect.
Thanks.
04/16/2024 03:21 AM - edited 04/16/2024 03:31 AM
Hi @sudeshjaiswal
I am trying to connect to EC_NOV application. attaching the postman screenshot and Few logs
Application name : EC_NOV
04/17/2024 02:14 AM
Hello @nbillu,
Please try with the below sample and share the debug logs, also add the testconnectionsparams to make sure the connectiosn is working fine.
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "https://{URL}",
"httpMethod": "POST",
"httpParams": {
"username": "******",
"password": "******",
"grant_type": "******",
"client_id": "*******",
"client_secret": "*****",
"new_token": "true"
},
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Failed to parse JWT",
"invalid_token"
],
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"retryFailureStatusCode": [
401
],
"accessToken": "Bearer ABCD"
}
}
}
Thanks
04/17/2024 06:08 PM
@sudeshjaiswal Application uses refresh token not access token. Access token expiry is 5 minutes . URL for refresh token and access token are same.
04/17/2024 10:07 PM
Hello @rushikeshvartak @nbillu,
Did you try using basic instead of auth,
{
"authentications": {
"acctAuth": {
"authType": "oauth2", -- try Basic
"url": "https://{URL}",
"httpMethod": "POST",
"httpParams": {
"grant_type": "******",
"client_id": "*******",
"client_secret": "*****"
},
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic XXXXX" --you need to use username & password and get the encrypted string from postman
},
"authError": [
"InvalidAuthenticationToken"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "abcdefg",
"testConnectionParams": {
"http": {
"url": "XXXX",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET",
"successResponses": {
"message": [
"Process completed successfully"
]
},
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
}
}
Thanks,
04/17/2024 10:12 PM
Its not basic auth , Its oauth2
05/15/2024 03:18 PM
You need to upload public certificate in certificates management to resolve issue and perform restart