08/30/2022 11:17 AM
We have a requirement for the REST based integration with a target to retrieve the latest password from the target system's API. The REST connection uses basic auth to get an access token from the token endpoint and use that to authenticate with the user access management API of the target system to manage imports and provisioning. The target system will change the password to the token endpoint every 24 hrs and the latest password will be made available through a password API endpoint.
I would like to know if there is any configuration in EIC to be able to fetch the latest password at real time so that Saviynt can then use the recent password to get the access token from the token endpoint.
08/30/2022 12:30 PM
You can create custom jar which will run in chain job feteching latest password/token from target updating connection json using REST API then running import/Provisioning
08/30/2022 09:36 PM
Hi ,
Can you confirm my understanding on this
"updating connection json using REST API" - We need to use Saviynt REST api to update Connection , but i dont find update connection api, or Can you share any link or sample code for this if possible
08/31/2022 05:43 AM
Each time you run a job that uses the connection to import it should make a call out to the API to pull a new token. We recently set this up for a connection where the token expires after 30 minutes.
Setup the token call in the connection JSON and then you can use the token in the import.
Here is our connection JSON. This was for a user import, but I'm guessing an account import would be the same. It has a lot of HTTP Params you likely won't need, just use the required ones.
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "",
"httpMethod": "POST",
"httpParams": {
"grant_type": "password",
"client_id": "",
"client_secret": "",
"username": "",
"password": "",
"company": "",
"device_id": ""
},
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID",
"invalid_grant"
],
"timeOutError": "Read timed out",
"errorPath": "error",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abcd",
"retryFailureStatusCode": [
401
]
}
}
}
Then the import JSON will use the token that was just pulled.
{
"showLogs": true,
"connection": "userAuth",
"url": "",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"firstname": "givenname~#~char",
"lastname": "surname~#~char",
"statuskey": "statuskey~#~char",
"displayname": "displayname~#~char",
"location": "homeoffice~#~char",
},
"userResponsePath": ""
}
08/31/2022 05:46 AM
There's also a document available on freshdesk that details the difference if you need a password and/or a token. I think you would pull the password in the connection JSON and then pass that instead into the import.
08/31/2022 06:48 PM - edited 08/31/2022 06:50 PM
We can write Java program to read ' password2' from external system and then
How to update ConnectionJSON ? programmatically or Configurations ?
09/02/2022 11:07 AM
Use Testconnection API to create connection
09/02/2022 06:09 AM
Is there any response to the above question? I too had the exact same question when I reviewed the available APIs to manage connection objects in Saviynt.
09/05/2022 03:35 PM
You can create /update connection using testconnection API
REST connector Example
https://documenter.getpostman.com/view/1797923/RWaLwo21#27f58230-b3c0-45c9-adba-77fc3447e3e6
to check parameters go to admin - connections - connection type
Formdata parameters needs to exact same
Postman :
SSM :
Application :