Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/22/2024 12:32 PM - last edited on 10/22/2024 01:32 PM by Dave
Hi,
I want to update a customproperty in user object. As a first step, I am trying to create a Sav4Sav Rest Connector with userimport json. Then create a Job using userimport via connection and run the job to check the import.
My Job is failing and I am getting null response for the import in the logs
ConnectionJson
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Accept": "application/json"
},
"authError": [
"InvalidAuthenticationToken"
],
"url": "https://ssm.saviyntcloud.com/ECM/api/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"User\",\"password\":\"Password\"}",
"httpHeaders":{"Content-Type":"application/json"},
"authError":["USER_AUTHENTICATION_FAILED","PARTNER_AUTHENTICATION_FAILED", "AuthenticationFailed"],
"errorPath": "error.code",
"maxRefreshTryCount": 2,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"retryFailureStatusCode": [
401
]
}
}
}
For the username and password, I had a Rest connector created automatically when global configuration setting was enabled for Sav to Sav. I found the username and password of that connection from logs and used that. Is that an issue? For the access token, I used the API in postman to get the token and use it in the connection.
ImportUserJson
{
"connection": "acctAuth",
"url": " https://ssm.saviyntcloud.com/ECM/api/v5/getUser",
"httpMethod": "POST",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded",
"Authorization": "${access_token}"
},
"httpParams": {
"userQuery": "username in ('Test')",
"responsefields":["username","statuskey","customproperty31"]
},
"colsToPropsMap": {
"username": "username~#~char",
"customproperty31": "customproperty31~#~char"
},
"errorCode": "400",
"errorCodePath": "errorCode",
"userResponsePath": "userdetails",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": 99999
}
}
}
Getting Below error when i run the job.
Any help would be appreciated
Regards,
Deepa
[This post has been edited by a Moderator to remove sensitive information.]
10/22/2024 01:32 PM
{
"connection": "acctAuth",
"url": "https://sample-dev.saviyntcloud.com/ECM/api/v5/getUser",
"httpMethod": "POST",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded",
"Authorization": "${access_token}"
},
"httpParams": {
"userQuery": "username in ('Test')",
"responsefields": [
"username",
"statuskey",
"customer",
"customproperty4",
"employeeType",
"endDate"
]
},
"colsToPropsMap": {
"username": "username~#~char",
"customproperty31": "customproperty31~#~char"
},
"errorCode": "400",
"errorCodePath": "errorCode",
"userResponsePath": "userdetails",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": 99999
}
}
}