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 create account

AtrayeeDutta
Regular Contributor
Regular Contributor

Hi Team,

We have a scenario, where in create acc JSON, we are passing the parameters in URL, there is not body or headers in the callm working and creating acc from postman. This is basic auth, passing username and pwd in the createAcc call itself.

below is the json:

{
"accountIdPath": "${user.email}",
"responseColsToPropsMap": {},
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://**********.com/cockpit_10-2-2h/RunCommand.ase?oThis=d|0x00000016|2932|0|6b64|10000&sCommand=NewUser&sUserName=${user.username}&sFirstName=${user.firstname}&sLastName=${user.lastname}&sMiddleName=${user.middlename}&sEmail=${user.email}&sDoLogoutWhenDone=true&bUpdateTxn=true",
"httpMethod": "POST",
"httpParams": "{}",
"httpHeaders": {},
"properties": {
"userName": "*****",
"password": "****"
},
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
}
}
]
}

 

Getting below error in the logs:

Date Timestamp-Service Name-Class Name-Thread Name-Log Level-Message

2024-05-21T15:52:39+05:30-ecm-worker-services.ArsTaskHelperService-quartzScheduler_Worker-4-qp22w-DEBUG-new account , accountName = chaudv2 , taskType = 3

 

2024-05-21T15:52:39+05:30-ecm-worker-services.ArsTaskService-quartzScheduler_Worker-4-qp22w-DEBUG-Calling rest createAccount with Sec System - Cockpit and tasklist - [chaudv2:[com.saviynt.ecm.task.ArsTasks : 1290404]]

 

2024-05-21T15:52:39+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-4-qp22w-ERROR-Error while creating account - chaudv2 removing tasks from the list

 

2024-05-21T15:52:39+05:30-ecm-worker-services.ArsTaskService-quartzScheduler_Worker-4-qp22w-DEBUG-{chaudv2=[]}

 

2024-05-21T15:52:36+05:30-ecm-worker-services.ArsTaskHelperService-quartzScheduler_Worker-2-qp22w-DEBUG-partitionList query execution userAccQry = select concat_ws('###',acc.name,u.USERKEY,acc.ENDPOINTKEY) as accUserEnd, concat_ws('###',acc.name,acc.ENDPOINTKEY) as accNameEnd, acc.accountKey from users u, user_accounts ua, accounts acc where u.USERKEY = ua.USERKEY and ua.ACCOUNTKEY = acc.ACCOUNTKEY and ( (1 = 1 and acc.name = 'chaudv2' and acc.ENDPOINTKEY = 49 ) )

 

2024-05-21T15:52:36+05:30-ecm-worker-services.ArsTaskHelperService-quartzScheduler_Worker-2-qp22w-DEBUG-ended preValidateTasksBeforeMapping[[SECURITYSYSTEM:39, TASKTYPE:3, EXTERNALCONNECTION:null, USERKEY:7, TASKKEY:1290404, PARENTTASK:null, REQUESTRULETASKCREATED:false, UPDATEACCOUNTTASKCREATED:false, ACCOUNTKEY:null, ENTITLEMENT_VALUEKEY:null, STARTDATE:2024-05-17 15:29:52.0, ENDDATE:null, ACCOUNTNAME:chaudv2, ENDPOINT:49]]

Anyone having any idea where it is misconfigured?

Regards,

Atrayee 

 

5 REPLIES 5

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @AtrayeeDutta 

Can you please check if accountIdPath is correct?

Please refer this post and c heck if it helps. Also please use "showLogs": true in configJSON and share full logs.

Solved: Syntax for accountIdPath in Create Account JSON - Saviynt Forums - 83630

Solved: accountIdPath in Create account JOSN for REST Conn... - Saviynt Forums - 66314

Regards,

Dhruv Sharma

rushikeshvartak
All-Star
All-Star

/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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Team,

Get the reference to the user for subsequent call to disable the user:
GET: https://**********/cockpit_10-2-2h/RunMethod.ase?sMethod=::UDM_GetUserReference&sLoginName=testuser11&sDoLogoutWhenDone=true&bUpdateTxn=false

returned user reference value in Test environment: d|0x00000016|3318|0|4fa4|10000

Call DisableLoginAccount to mark the user disabled in Cockpit:
POST: https://*************/cockpit_10-2-2h/RunMethod.ase?sMethod=DisableLoginAccount&sRef=d|0x00000016|33...

User getting disabled from postman but in Saviynt this code->d|0x00000016|3318|0|4fa4|10000 is not passing. Throwing error as illegal character maybe for the pipeline characters

can you please let me how can we parse it. 

Regards

Instead of pipe (|) try %7C


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

AtrayeeDutta
Regular Contributor
Regular Contributor

Hi Rushikesh,

Below is Create account JSON.

{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://*******.bsci.bossci.com/cockpit_10-2-2h/RunMethod.ase?sMethod=::UDM_GetDefaultUsersReference&sDoLogoutWhenDone=true&bUpdateTxn=false",
"httpMethod": "GET",
"httpParams": "{}",
"httpHeaders": {
"Content-Type": "text/html",
"Accept": "*/*"
},
"properties": {
"userName": "******",
"password": "******"
},
"httpContentType": "text/html",
"successResponses": {
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
403
]
}
},
{
"name": "call2",
"connection": "acctAuth",
"url": "https://*******.bsci.bossci.com/cockpit_10-2-2h/RunCommand.ase?oThis=${response.call1.message}&sCommand=NewUser&sUserName=${user.username}&sFirstName=${user.firstname}&sLastName=${user.lastname}&sMiddleName=${user.middlename}&sEmail=${user.email}&sDoLogoutWhenDone=true&bUpdateTxn=true",
"httpMethod": "POST",
"httpParams": "{}",
"httpHeaders": {
"Content-Type": "text/html",
"Accept": "*/*"
},
"properties": {
"userName": "******",
"password": "*****"
},
"httpContentType": "text/html",
"successResponses": {
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
403
]
}
}
]
}

Call1 is returning the token, and in call2 we need to pass the token.

Call 1 returning then token as below.

AtrayeeDutta_0-1717489136621.png

Saviynt throwing error while passing the token in call2

Regards