Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/21/2023 01:17 PM
08/21/2023 11:16 PM
You may need to specify the auth type that needs to be used in the connection JSON. I am not sure if it will work if the authtype is not mentioned. If oauth2 is not being accepted and if that is already tested, then you may try using authtype 'BasicWithAccessToken'. Also, can you replace the tokenResponsePath to data.access_token and refreshTokenResponsePath to data.refresh_token?
You may also want to replace "refresh_token": "${refreshToken}" with "refresh_token": "${refresh_token}" in the httpParams section for access token.
If the token type is a bearer, then you may want to pass the access token accordingly.
You can refer to the below sample
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://<domain name>/oauth/token",
"httpMethod": "POST",
"httpParams": {
"company_id": "<>",
"client_id": "<>",
"grant_type": "<>",
"assertion": "${refresh_token}"
},
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"authError": [
"Unable to authenticate the client",
"Invalid OAuth token Bearer"
],
"retryFailureStatusCode": [
401
],
"errorPath": "",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"refreshType": "RefreshToken",
"tokenType": "Bearer",
"accessToken": "Bearer asdsdfghjk",
"refreshToken": "<>",
"refreshTokenAuthError": [
"Unable to retrieve SAML assertion",
"The provided SAML assertion is expired"
],
"refreshTokenErrorPath": "errorMessage",
"refreshTokenCall": {
"refreshTokenResponsePath": "",
"url": "https://<domain name>/oauth",
"httpMethod": "POST",
"httpParams": {
"client_id": "<>",
"user_id": "<>",
"token_url": "https://<domain name>/oauth/token",
"private_key": "<>"
},
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded"
}
}
}
}