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

remove acces task is not completed - Rest Connector

Shaik-Misba
New Contributor III
New Contributor III

I am trying do deprovisioning access. the task is triggered but it is not completed. This is the error that I can see in logs.

"2024-07-22T17:04:21.087+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-3-r5twx","DEBUG","Total Call: 1"
"2024-07-22T17:04:21.088+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-3-r5twx","ERROR","Error in processWebservicegroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String#<init>."
"2024-07-22T17:04:21.374+00:00","ecm-worker","","null-r5twx","","Cannot resolve which method to invoke for [null] due to overlapping prototypes between:"
"2024-07-22T17:04:21.374+00:00","ecm-worker","","null-r5twx",""," [class [B]"
"2024-07-22T17:04:21.374+00:00","ecm-worker","","null-r5twx",""," [class [C]"
"2024-07-22T17:04:21.374+00:00","ecm-worker","","null-r5twx",""," [class java.lang.String]"

this is my removeaccesjson:-

{
"call": [
{
"name": "roles",
"connection": "userAuth",
"http": {
"url": "https://xx/scim/v2/Users/<id>,
"httpMethod": "PATCH",
"httpParams": {
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations": [
{
"op": "replace",
"value": {
"roles": [
{
"value": "${String val=\"No Permissions\"; return val;}"
}
]
}
}
]
},
"httpHeaders": {
"Accept": "application/json",
"Authorization": "${access_token}"
}
},
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [

400,
401,
403,
404,
405,
409
]
}
}
]
}

I tried by passing http params value with escape characters as well. Still getting same error. Could you please help me out?

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Share postman response


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

@rushikeshvartak 

here you go

curl --location --request PATCH 'https://abc.com/scim/v2/Users/14340' \
--header 'Authorization: Bearer abc \
--header 'Content-Type: application/json' \
--data '
{
                    "schemas": [
                        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
                    ],
                    "Operations": [
                        {
                            "op": "replace",
                            "value": {
                                "roles": [
                                    {
                                        "value": "No Permissions"
                                    }
                                ]
                            }
                        }
                    ]
                }'

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

What is response of api 200/201

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]



⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️


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

the response code will be 200. The resposne body will be the account details with the updated role will be reflected.

Hi @Shaik-Misba please try with the below JSON

{
  "call": [
    {
      "name": "roles",
      "connection": "userAuth",
      "url": "https://xx/scim/v2/Users/<id>",
      "httpMethod": "PATCH",
      "httpParams": "{\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\": [{\"op\": \"replace\",\"value\": {\"roles\": [{\"value\": \"${String val=\"No Permissions\"; return val;}\"}]}}]}",
      "httpHeaders": {
        "Accept": "application/json",
        "Authorization": "${access_token}"
      },
      "successResponses": {
        "statusCode": [
          200,
          201,
          204
        ]
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          401,
          403,
          404,
          405,
          409
        ]
      }
    }
  ]
}

 

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.

Shaik-Misba
New Contributor III
New Contributor III

It is syntax error. Thank you.

 

Share working json


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