Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Updateuserjson Sav4Sav

Srinivas_N
New Contributor III
New Contributor III

Hi Team,

Im using sav4sav update user json which will trigger an run time analytics for fetching and updating users. The thing is its fetching user and pending task is created but once we complete the task it is not updating the user.

Attaching the updateuserjson below.

{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\",\"username\":\"${username}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "Update Login",
"callOrder": 1,
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${response.'Update Login'.message.result[0].USERNAME}\",\"customproperty1\":\"${response.'Update Login'.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
}
}


Analytics query:

Select username as username, 'Testing Success' as customproperty1 from users where customproperty1 = '${customproperty1}'

can someone help me what is the issue?

Thanks in advance
Srinivas N

19 REPLIES 19

rushikeshvartak
All-Star
All-Star

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Esteemed Contributor
Esteemed Contributor

Hi @Srinivas_N keep static data in username what I have seen it doesn't work with passing dynamic value.


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Srinivas_N
New Contributor III
New Contributor III

Hi @rushikeshvartak / @NM ,

I tried passing static value but no luck, tried below query

  • Select username as username, 'Testing Success' as customproperty1 from users where customproperty1 = 'ABCD'

    Thanks
    Srinivas N

Share logs


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Srinivas_N
New Contributor III
New Contributor III

attaching the screenshot for logs

Srinivas_N_0-1724816797489.png

 

Share text file


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Esteemed Contributor
Esteemed Contributor

Hi @Srinivas_N , try this json

{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "Update Login",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${response.'Update Login1.message.result[0].USERNAME}\",\"customproperty1\":\"${response.Update Login1.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
}
}


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Srinivas_N
New Contributor III
New Contributor III

logs in text file

Logs does not have any relevant information. share logs for 5 minutes after running job


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Srinivas_N
New Contributor III
New Contributor III

@NM ,
I tried with your json but it didnt work

NM
Esteemed Contributor
Esteemed Contributor

@Srinivas_N  try this

{
"actions": {
"Update Login": {
"call": [
{
"name": "call1",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "call2",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${response.call1.message.result[0].USERNAME}\",\"customproperty1\":\"${response.call1.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
}
}


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Srinivas_N
New Contributor III
New Contributor III

@rushikeshvartak ,

attaching the log file

Whenever your sharing logs first check whether job name or report name exists in report. 

Share log file as .txt


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Use below JSON

 

{
  "actions": {
    "Update Login": {
      "call": [
        {
          "name": "Update Login",
          "connection": "userAuth",
          "url": "url/ECM/api/v5/FetchRuntimeControlsData",
          "httpMethod": "POST",
          "httpContentType": "application/json",
          "httpParams": "{\"analyticsid\":\"1557\",\"attributes\":{\"username\":\"${user.username}\"}}",
          "httpHeaders": {
            "Authorization": "${access_token}"
          },
          "successResponses": {
            "statusCode": [
              200,
              201
            ]
          }
        },
        {
          "name": "Update Login",
          "connection": "userAuth",
          "url": "url/ECM/api/v5/updateUser",
          "httpMethod": "POST",
          "httpParams": "{\"username\":\"${response.'Update Login'.message.result[0].USERNAME}\",\"customproperty1\":\"${response.'Update Login'.message.result[0].CUSTOMPROPERTY1}\"}",
          "httpHeaders": {
            "Authorization": "${access_token}"
          },
          "httpContentType": "application/json",
          "successResponses": {
            "message": "User Updated Successfully",
            "statusCode": [
              200,
              201
            ]
          },
          "unsuccessResponses": {
            "statusCode": [
              500,
              403,
              409,
              412
            ]
          }
        }
      ]
    }
  }
}

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Srinivas_N
New Contributor III
New Contributor III

Hi @naveenss , need your input on this can you please help

Did you tried above last json shared


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Srinivas_N
New Contributor III
New Contributor III

yes tried above json its not working

Share logs and config /json screenshot


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

naveenss
All-Star
All-Star

@Srinivas_N the below JSON is working for me in 24.4. I've created a v2 runtime analytics

{
  "actions": {
    "Update Login": {
      "call": [
        {
          "name": "Update Login",
          "connection": "userAuth",
          "url": "https://url/ECM/api/v5/fetchRuntimeControlsDataV2",
          "httpMethod": "POST",
          "httpContentType": "application/json",
          "httpParams": "{\"analyticsid\":\"1519\",\"attributes\":{\"username\":\"${user.username}\"}}",
          "httpHeaders": {
            "Authorization": "${access_token}"
          },
          "successResponses": {
            "statusCode": [
              200,
              201
            ]
          }
        },
        {
          "name": "Update Login",
          "connection": "userAuth",
          "url": "https://url/ECM/api/v5/updateUser",
          "httpMethod": "POST",
          "httpParams": "{\"username\":\"${response.'Update Login'.message.results[0].username}\",\"customproperty1\":\"${response.'Update Login'.message.results[0].customproperty1}\"}",
          "httpHeaders": {
            "Authorization": "${access_token}"
          },
          "httpContentType": "application/json",
          "successResponses": {
            "message": "User Updated Successfully",
            "statusCode": [
              200,
              201
            ]
          },
          "unsuccessResponses": {
            "statusCode": [
              500,
              403,
              409,
              412
            ]
          }
        }
      ]
    }
  }
}
Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.