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

unable to regenerate access token in client_credentials grant type(oauth2)

saramohan
New Contributor
New Contributor

Hi, We are facing issue in regenerating the access token in connection json. Attaching the json and the logs, error received.

Error while trying to create/update account from saviynt as the token is expired. The token is not getting regenerated even though we have mentioned the retryfailurestatuscode in the json. It is using the token which is mentioned explicitely in the connection json. If we update the token in connection json generated from postman it works.

This is the error response. 
Got Webservice API Response: [headers:[Content-Type: application/json, Content-Length: 26, Connection: keep-alive, Date: Wed, 10 May 2023 04:09:47 GMT, x-amzn-RequestId: e5ecbc18-c41c-46f2-b1d9-5cd145f0d461, Access-Control-Allow-Origin: *, Access-Control-Allow-Headers: *, x-amzn-ErrorType: UnauthorizedException, x-amz-apigw-id: EsDZ3FqMSwMFfgQ=, X-Cache: Error from cloudfront, Via: 1.1 f10eedb52fc0d82204e85d20112deafa.cloudfront.net (CloudFront), X-Amz-Cf-Pop: SYD62-P2, X-Amz-Cf-Id: yE6xNWeITD12cAynBSA5yCgv5VjfWNcwajxz1XgnmRKM_EZ3OFT_6g==], responseText:{"message":"Unauthorized"}

 

Please let us know how to fix this issue, how to regenerate the access token everytime and use in the subsequent calls.

Tagging @Sivagami @SB for immediate response as it is very urgent.

4 REPLIES 4

SB
Saviynt Employee
Saviynt Employee

Can you confirm if you are able to make the calls successfully from Postman? 

If this is working from postman, can you try to pass a valid non-expired token value and see if that works.


Regards,
Sahil

saramohan
New Contributor
New Contributor

Hi Sahil,

 

It works with the token generated from postman, only when the token expired, we are facing issue and not regenerating it when the token is expired.

SB
Saviynt Employee
Saviynt Employee

Based on the error I see in the logs it appears to be an auth issue and not the token regeneration. Can you share the below as well 

1. Postman export of the auth call.

2. Screenshot of postman response for the auth call

3. Complete job logs right from the time stamp where the job starts.


Regards,
Sahil

aksharkay
New Contributor III
New Contributor III

Hi, if you don't mind, can you please let me know if you got any resolution on this issue? I am facing the exact same issue in my project and would like to know what steps were taken to resolve this.