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

Disable Account is updating the status correctly in target - REST Connector

midhunj
New Contributor
New Contributor
Disable Account is updating the status correctly in target - REST Connector.
 
Description; We are using OOTB rest connector and we have following three functionality, import, enable account and disable account.
 
We are seeing discrepancy for enable and disable account use cases.
 
We are seeing tasks is created for both enable and disable account and tasks is completed successfully after WSRETRY job and I can see success message in the tasks response whereas when we see in target the status is not getting updated at all.
 
Following is the JSON we used.
 
Enable Account JSON,
 
{
         "call":[
            {
               "name":"call1",
               "connection":"acctAuth",
               "httpMethod":"PATCH",
               "httpParams":"{\"workerStatus.active\":true}",
               "httpHeaders":{
                  "Authorization":"${access_token}"
               },
               "httpContentType":"application/json",
               "successResponses":{
                  "statusCode":[
                     200,204
                  ]
               },
 "unsuccessResponses":{
                  "statusCode":[
                     400,404
                  ]
               }
            }
         ]
      }
  
Disable account JSON,
 
{
   "call":[
      {
         "name":"call1",
         "connection":"acctAuth",
"httpMethod":"PATCH",
         "httpContentType":"application/json",
         "httpParams":"{\"workerStatus.active\":false}",
         "httpHeaders":{
            "Authorization":"${access_token}"
         },
         "successResponses":{
            "statusCode":[
               200,204
            ]
         },
         "unsuccessResponses":{
            "statusCode":[
               400,404
            ]
         }
      }
   ]
}
 
When we use the same body (http params) in postman it is updating successfully. I have attached screenshot for the same.
 
We tried following different ways for https params all are failing,
 
{\"workerStatus.active\":\"false\"},
{"workerStatus.active":"false"},
{"workerStatus.active":"false"},
{\"workerStatus.active\":false}",
{\"workerStatus.active\":0}" - even we tried with boolean values, still the same error.
 
 
Attached are the logs too
midhunj_1-1722545680874.png

In Saviynt completed tasks response,

midhunj_2-1722545717300.png

[This post has been edited by a Moderator to remove sensitive information.]

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Share logs

{
         "call":[
            {
               "name":"call1",
               "connection":"acctAuth",
               "httpMethod":"PATCH",
               "httpParams":"{\"workerStatus\"{\"active\":true\"}}",
               "httpHeaders":{
                  "Authorization":"${access_token}"
               },
               "httpContentType":"application/json",
               "successResponses":{
                  "statusCode":[
                     200,204
                  ]
               },
 "unsuccessResponses":{
                  "statusCode":[
                     400,404
                  ]
               }
            }
         ]
      }
 
Enable Account
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://************/services/api/x/users/v2/employees/${account.customproperty1}",
"httpMethod": "PATCH",
"httpParams": "{\"workerStatus\"{\"active\":\"true\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
404
]
}
}
]
}

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

NM
Honored Contributor II
Honored Contributor II

Hi @midhunj , enable account json

{

         "call":[

            {

               "name":"call1",

               "connection":"acctAuth",

               "url":"https://************/services/api/x/users/v2/employees/${account.customproperty1}",

               "httpMethod":"PATCH",

               "httpParams":"{\"workerStatus\"{\"active\":\"true\"}}",

               "httpHeaders":{

                  "Authorization":"${access_token}"

               },

               "httpContentType":"application/json",

               "successResponses":{

                  "statusCode":[

                     200,204

                  ]

               },

 "unsuccessResponses":{

                  "statusCode":[

                     400,404

                  ]

               }

            }

         ]

      }

Disable account json

{
         "call":[
            {
               "name":"call1",
               "connection":"acctAuth",
               "httpMethod":"PATCH",
               "httpParams":"{\"workerStatus\"{\"active\":\"false\"}}",
               "httpHeaders":{
                  "Authorization":"${access_token}"
               },
               "httpContentType":"application/json",
               "successResponses":{
                  "statusCode":[
                     200,204
                  ]
               },
 "unsuccessResponses":{
                  "statusCode":[
                     400,404
                  ]
               }
            }
         ]
      }

midhunj
New Contributor
New Contributor

@rushikeshvartak @NM we are seeing following error for the JSON provided,

midhunj_0-1722611934623.png

Attached are logs too

NM
Honored Contributor II
Honored Contributor II

Try @midhunj 

enable account json

 

{

 

         "call":[

 

            {

 

               "name":"call1",

 

               "connection":"acctAuth",

 

               "url":"https://************/services/api/x/users/v2/employees/${account.customproperty1}",

 

               "httpMethod":"PATCH",

 

               "httpParams":"{\"workerStatus\":{\"active\":\"true\"}}",

 

               "httpHeaders":{

 

                  "Authorization":"${access_token}"

 

               },

 

               "httpContentType":"application/json",

 

               "successResponses":{

 

                  "statusCode":[

 

                     200,204

 

                  ]

 

               },

 

 "unsuccessResponses":{

 

                  "statusCode":[

 

                     400,404

 

                  ]

 

               }

 

            }

 

         ]

 

      }

 

Disable account json

 

{

         "call":[

            {

               "name":"call1",

               "connection":"acctAuth",

               "url":"https://************/services/api/x/users/v2/employees/${account.customproperty1}",

               "httpMethod":"PATCH",

               "httpParams":"{\"workerStatus\":{\"active\":\"false\"}}",

               "httpHeaders":{

                  "Authorization":"${access_token}"

               },

               "httpContentType":"application/json",

               "successResponses":{

                  "statusCode":[

                     200,204

                  ]

               },

 "unsuccessResponses":{

                  "statusCode":[

                     400,404

                  ]

               }

            }

         ]

      }

midhunj
New Contributor
New Contributor

This works now! Thanks