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

Sav4Sav Update user json not working as expected

sampath18
Regular Contributor II
Regular Contributor II

Hi All,

I am facing a simple issue but no clue what is going wrong.

So using Sav4sav REST connection v23.9 i am trying to create update user tasks with user update rule when some event occurs, through the task i wanted to set some value or remove value from one of cp.

update user task gets created and completed when i run a job with update user task with no ss mention. However, the desired output of manipulating attribute is not happening.

below is JSON i tried. can anyone suggest what am i doing wrong here? why is it not working

{

"call":[
{
"name":"call1",
"connection":"userAuth",
"url":"https://b*********-dev-support.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user.username}\",\"customproperty32\": \"Testing\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
}
]
}

13 REPLIES 13

rushikeshvartak
All-Star
All-Star

Any errors in logs & please check json is placed in right location in connection

rushikeshvartak_0-1698288062032.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

@sampath18 

Could you please replicate the issue and share the error from logs.

Regards,

Dhruv Sharma

sampath18
Regular Contributor II
Regular Contributor II

Hi @rushikeshvartak 

I have placed JSON in correct filed of the connection. Attached is for refernece.

Even in the provisioning job i have added task type as update user , the task completes with out performing desired action.

Thanks

Sampath

Update user only support below 3 operations

rushikeshvartak_0-1698297346119.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

sampath18
Regular Contributor II
Regular Contributor II

Hi @rushikeshvartak 

Here is the issue, in user update rule there are actions as you higlighted, then when i used below json then it worked.

{
"actions": {
"Update Login": {
"call": [
{
"name":"call1",
"connection":"userAuth",
"url":"https://*******-dev-support.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty31\": \"\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
}
]
}
}
}

 

Thanks
Sampath

sampath18
Regular Contributor II
Regular Contributor II

Hi @rushikeshvartak 

Where did you find this information? does it mean update user json is unuseful for regular attribute updates in user profile?

because from postman everything works when used updateuser api call. But from connection it does not work?

Are there any recommendation on how to set attributes values in user profiles when required ?

Thanks

Sampath

alex1
New Contributor III
New Contributor III

We are facing the same issue. We want to update other attributes than username (who thought it would be a good idea to limit it to username..?). According to the documentation this is what it says regarding Update User Task: 

alex1_0-1699955106377.png

So it is very misleading. 

sampath18
Regular Contributor II
Regular Contributor II

@ALE No, you can update any of the user attributes using update user json. While triggering update user task through User update rule. Selection update login and use the same action your json.

{
"actions": {
"Update Login": {
"call": [
{
"name":"call1",
"connection":"userAuth",
"url":"https://<domain>/ECM/api/v5/updateUser",
"httpMethod":"POST",
"httpContentType":"application/json",
"httpParams":"{\"username\": \"${user?.username}\",\"customproperty31\": \"${(user?.customproperty31 == '3DaysRemindersent')?'':''}\",\"customproperty39\":\"\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"successResponses":{
"message":"User Updated Successfully",
"statusCode":[
200,
201
]
}
}
]
}
}
}

alex1
New Contributor III
New Contributor III

@sampath18 Thanks. I have almost the exact same JSON but it doesn't update. But then I'll keep trying since you have confirmed that it should work, thanks!

Jennifer
New Contributor
New Contributor

I am also facing the same issue have u found out any solution? My user is not getting updated! I have used the same format what @sampath18  has used...

sampath18
Regular Contributor II
Regular Contributor II

Hi @Jennifer if your update user json is same as above, then check the user update rule configured for sav4sav endpoint and then in the job you configured do not mention any security system, just add the task type alone.

Under user update rule select action as per the JSON. e.g update Login

Hi @sampath18 I tried the same but still the user is not getting updated.

 

Create new thread 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.