Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Access token is not getting regenerated by REST connector

Debankita
New Contributor III
New Contributor III

Hi Team,

I am facing issue in re-generating the access token in connection json. It is need to manually update the access token from postman.

I have tried with both the authtype BasicWithAccessToken as well as Oauth2. But I am facing the same issue in both the cases.

Please find the attached connection json and please suggest me what changes do I need to perform in it in order to resolve it

 

{
"authentications": {
"acctAuth": {
"authType": "BasicWithAccessToken",
"url": "https://<hostname>/services/oauth2/token",
"httpMethod": "POST",
"httpHeaders": "application/x-www-form-urlencoded",
"properties": {
"grant_type": "password",
"client_id": "****",
"client_secret": "******",
"userName": "******",
"password": "********"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "ExpiredAuthenticationToken",
"retryFailureStatusCode": [403,401,500],
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken",
"INVALID_SESSION_ID"
],
"timeOutError": "Read timed out",
"errorPath": "error",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer 00D050000000MPb!AQYAQHbFKb24fJZkfq.2erqw5mjKQqnHbp8zzCVtqs6ONKm_BPO4tskGL5BxFnybouAI3ymaHtDZ4EXBCxZGSq2Ray9SwUbb"
}
}
}

1 REPLY 1

adriencosson
Valued Contributor
Valued Contributor

Hi @Debankita,

Here are a few recommendations for you to troubleshoot the token generation.

  1. As mentioned in your JSON, you are using OAuth 2.0 authentication type. Therefore, keep "oauth2" as authType
  2. When declaring the authentication, you will give it a name. In your JSON, this name is "acctAuth". Therefore, ensure this name is also used in your "connection" parameter in your other connector's JSON parameters.
  3. In the logs, this can be seen if your connector is is performing from one to <maxRefreshTryCount> retries (in your case : 5)
  4. In ConfigJSON parameter, insert the following, that should display response from the API
{"showLogs":true}

Hope this helps !

Regards,
Adrien COSSON