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

REST connector: AddAccessJSON using PATCH method

VergelVega
New Contributor
New Contributor

Anyone have tried to use a "PATCH" method in AddAccessJSON? We tried to use this in REST connector but doesn't work. In postman, this method is working.

//AddAccessJSON

{
  "call": [{
      "name": "Group",
      "connection": "accAuth",
      "url": "<URL>/t/carbon.super/scim2/Groups/${id}",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "httpContentType": "application/json",
      "httpMethod": "PATCH",
      "httpParams": "{\"schemas\": [\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\": [{\"op\": \"add\",\"value\": {\"members\":[{\"display\":\"${account.name}\",\"value\":  \"${account.accountID}\"}]}}]}",
      "successResponses": {
        "statusCode": [200, 201, 202, 203, 204]
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          401,
          404,
          405,
          500
        ]
      }
    },
    {
      "name": "Roles",
      "connection": "accAuth",
      "url": "<URL>/t/carbon.super/scim2/Roles/${id}",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "httpContentType": "application/json",
      "httpMethod": "PATCH",
      "httpParams": "{\"schemas\": [\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\": [{\"op\": \"add\",\"path\": \"users\",\"value\": [{\"value\": \"${account.accountID}\"}]}]}",
      "successResponses": {
        "statusCode": [200, 201, 202, 203, 204]
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          401,
          404,
          405,
          500
        ]
      }
    }
  ]
}
9 REPLIES 9

rushikeshvartak
All-Star
All-Star

what is error in logs


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

Vedanth_BK
Saviynt Employee
Saviynt Employee

Hi @VergelVega 

Analyzing the above JSON, the binding variable ${id} in the URL is incorrect. Please confirm if you are trying to map the entitlement value in the URL.
If yes, then please use ${entitlementValue.entitlementID}

Thank you 

VergelVega
New Contributor
New Contributor

replacing ${id} to ${entitlementValue.entitlementID} doesn't work also.

Share saviynt logs & postman screenshot 


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

screenshot from postman, adding user to a role.

VergelVega_1-1670470038534.png

For saviynt logs, not sure what exactly to look for. 

Check error under pending tasks section 


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

there's no error. the "add access" task did not auto-complete after we ran the app provisioning job.

Share application log when you run wsretry job


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

wsretry logs

VergelVega_4-1670481083897.png

VergelVega_5-1670481294428.png