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

Rest API Disable/Remove Account is failing with 500

GPS
New Contributor III
New Contributor III

Hello Team,

We are having issues while disabling account or removing account from Saviynt with the below errors

We are using the below Josn:

 

 

{
    "call": [
        {
            "name": "call1",
            "connection": "acctAuth",
            "url": "https://uat-cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/DisableUser?userName=${URLEncoder.encode(account.accountID, \"UTF-8\")}",
            "httpMethod": "POST",
            "httpHeaders": {
                "X-Api-key": "2****8*****F",
                "Accept": "application/json"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "statusCode": [
                    201,
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    401,
                    400,
                    403,
                    404,
                    405,
                    409,
                    502
                ]
            }
        }
    ]
}

 

 

Other Url tried:
"url": "https://uat-cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/DisableUser?userName=${a...}"

"url": "https://uat-cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/DisableUser?userName=<hardcoded accountName/accountID>"

Error:
Got Webservice API Response: [headers:[Cache-Control: private, Content-Type: application/json; charset=utf-8, Server: Microsoft-IIS/10.0, jsonerror: true, X-AspNet-Version: 4.0.30319, X-Powered-By: ASP.NET, Date: Tue, 20 Aug 2024 17:21:23 GMT, Content-Length: 91], responseText:{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}, cookies:[], statusCode:500]

Task Provisioning Comments:

Screenshot 2024-08-20 at 2.01.44 PM.png

It is working fine from postman:
Screenshot 2024-08-20 at 1.56.53 PM.png

Full logs:

2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-DEBUG-pastResponse: [headers:null, message:[Message:There was an error processing the request., StackTrace:, ExceptionType:], statusCode:500, description:null, status:Failed]
 
2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-DEBUG-Got Webservice API Response: [headers:[Cache-Control: private, Content-Type: application/json; charset=utf-8, Server: Microsoft-IIS/10.0, jsonerror: true, X-AspNet-Version: 4.0.30319, X-Powered-By: ASP.NET, Date: Tue, 20 Aug 2024 17:21:23 GMT, Content-Length: 91], responseText:{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}, cookies:[], statusCode:500]
 
2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-DEBUG-responseError : null
 
2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-DEBUG-isAuthError: false
 
2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-ERROR-Call response: {"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}
 
2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-ERROR-callResponseMap: [Message:There was an error processing the request., StackTrace:, ExceptionType:]
 
2024-08-20T13:21:23-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-9b76x-DEBUG-Task Response: {"auditDetails":{"call1":[{"headers":null,"message":{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""},"statusCode":500,"description":null,"status":"Failed"}]},"call1":{"headers":null,"message":{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""},"statusCode":500,"description":null,"status":"Failed"}}
 
2024-08-20T13:20:00-04:00-ecm-worker-jobs.WSRetryJob-quartzScheduler_Worker-1-9b76x-ERROR-WSRETRYJOB Job can't run since blocking wsretry is enabled
13 REPLIES 13

rushikeshvartak
All-Star
All-Star

Is this working with hardcoded values ?


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

GPS
New Contributor III
New Contributor III

@rushikeshvartak 
It is not working with hardcoded values as well from Saviynt.

Best regards,
GPS

 

{
    "call": [
        {
            "name": "call1",
            "connection": "acctAuth",
      "showResponse": true,
            "url": "https://uat-cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/DisableUser?userName=${URLEncoder.encode(account.accountID, \"UTF-8\")}",
            "httpMethod": "GET",
            "httpHeaders": {
        "Authorization": "${access_token}",

                "X-Api-key": "2****8*****F",
                "Accept": "application/json"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "statusCode": [
                    201,
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    401,
                    400,
                    403,
                    404,
                    405,
                    409,
                    502
                ]
            }
        }
    ]
}

 


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

GPS
New Contributor III
New Contributor III

Hello @rushikeshvartak 

We don't have any connection Json to get the token for this API.

 

{
"authentications": {
"acctAuth": {
"accessToken": "2********8*********F"
}
}
}

 

Do we still need to use the Access_token?


 

You can keep as Bearer abcd


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

Postman is GET URL and Saviynt JSON says POST http method 🙂


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

GPS
New Contributor III
New Contributor III

@rushikeshvartak 
Both Get and Post work from Postman, and I Tried both from Saviynt.
Screenshot 2024-08-20 at 1.56.53 PM.png
Screenshot 2024-08-20 at 2.39.30 PM.png
Still the same error:
DEBUG-Got Webservice API Response: [headers:[Cache-Control: private, Content-Type: application/json; charset=utf-8, Server: Microsoft-IIS/10.0, jsonerror: true, X-AspNet-Version: 4.0.30319, X-Powered-By: ASP.NET, Date: Tue, 20 Aug 2024 18:35:31 GMT, Content-Length: 91], responseText:{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}, cookies:[], statusCode:500]

 

{
    "call": [
        {
            "name": "call1",
            "connection": "acctAuth",
      "showResponse": true,
            "url": "https://uat-cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/DisableUser?userName=${account.accountID}",
            "httpMethod": "POST","httpParams": {},
            "httpHeaders": {
        "Authorization": "${access_token}",
      "X-Auth-Token": "2****8*****F",
                "Accept": "application/json"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "statusCode": [
                    201,
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    401,
                    400,
                    403,
                    404,
                    405,
                    409,
                    502
                ]
            }
        }
    ]
}

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

GPS
New Contributor III
New Contributor III

@rushikeshvartak 
Still the same:
Got Webservice API Response: [headers:[Cache-Control: private, Content-Type: application/json; charset=utf-8, Server: Microsoft-IIS/10.0, jsonerror: true, X-AspNet-Version: 4.0.30319, X-Powered-By: ASP.NET, Date: Tue, 20 Aug 2024 18:55:26 GMT, Content-Length: 91], responseText:{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}, cookies:[], statusCode:500]

Share logs in text file


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

GPS
New Contributor III
New Contributor III

@rushikeshvartak 
Please find the attached logs

Are you sure POST works ?

else try with GETWITHBODY


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

stalluri
Valued Contributor II
Valued Contributor II

@GPS 

Based on the log, I think the parameters are missing in the JSON.
"httpParams": "{}",
or
"httpParams": "",
or
"httpParams": {},

{
    "call": [
        {
            "name": "call1",
            "connection": "acctAuth",
            "url": "https://uat-cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/DisableUser?userName=${account.accountID}",
            "httpMethod": "POST",
            "httpParams": "{}",
            "httpHeaders": {
                "X-Auth-Token": "2****8*****F",
                "Accept": "application/json"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "statusCode": [
                    201,
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    401,
                    400,
                    403,
                    404,
                    405,
                    409,
                    502
                ]
            }
        }
    ]
}





Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.