We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

back slash not working in http parms - REST API

kolipakularavi
New Contributor
New Contributor

Hi Team,

we tried creating XLDOMAIN\<userName> using rest connector.   In order to include back slash

as part of user name creation we are getting the below error message.

what is the approach please help. we tried in the below format but still we are getting the error

 
{"call1":{"message":"Unrecognized character escape 'A' (code 65)\n at [Source: { \"schemas\":\"\", \"userName\":\"XLDOMAIN\\Ardian\", \"emails\":[{\"primary\":true,\"value\":\"username@domain.net\"}],\"password\":\"XXXXXXXXX\"}; line: 1, column: 39]","status":"Failed"}}
 
 

"httpParams": "{ \"schemas\":\"\", \"userName\":\"XLDOMAIN\\\\${user.username}\", \"emails\":[{\"primary\":true,\"value\":\"${user.email}\"}],\"password\":\"123K\"}",

{
"accountIdPath": "#CONST#${String id = response.call1.message.id; return id}",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"responseColsToPropsMap": {
"accountID": "call.message.userId~#~char",
"accountName": "call.message.userName~#~char",
"customproperty1": "call.message.meta.created~#~char",
"customproperty3": "call.message.meta.location~#~char",
"customproperty4": "call.message.meta.lastModified~#~char",
"customproperty5": "call.message.roles.type~#~char",
"customproperty6": "call.message.roles.value~#~char",
"customproperty7": "call.message.name.givenName~#~char",
"customproperty8": "call.message.name.familyName~#~char",
"customproperty9": "call.message.emails[0].value~#~char"
},
"call": [
{
"name": "call1",
"connection": "userAuth",
"showResponse": true,
"url": "https://domain/scim2/Users",
"httpMethod": "POST",
"httpParams": "{ \"schemas\":\"\", \"userName\":\"XLDOMAIN\\\\${user.username}\", \"emails\":[{\"primary\":true,\"value\":\"${user.email}\"}],\"password\":\"xxxxxxxx\"}",
"httpHeaders": {
"Authorization": "Basic xxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200,
204
]
}
}
]
}

[This message has been edited by moderator to mask sensitive info]

7 REPLIES 7

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @kolipakularavi,

The error message indicates that there is a unrecognized character in the username.

Did you tried using the two blackslash, or 8 blackslash,

"httpParams": "{ \"schemas\":\"\", \"userName\":\"XLDOMAIN\\${user.username}\", \"emails\":[{\"primary\":true,\"value\":\"${user.email}\"}],\"password\":\"123Kumar@\"}",

OR

"httpParams": "{ \"schemas\":\"\", \"userName\":\"XLDOMAIN\\\\\\\\${user.username}\", \"emails\":[{\"primary\":true,\"value\":\"${user.email}\"}],\"password\":\"123Kumar@\"}",

Thanks

Not worked -- I have given 8 slashes XLDOMAIN\\\\\\\\${user.username} as  an input user has been created like below -

XLDOMAIN\\ComUSER - with two slashes.
 

if I put two slashes below is the error message:---

{"auditDetails":{"call1":[{"headers":{"Server":"cloudflare","CF-RAY":"81ebac681b764abd-CGK","X-Content-Type-Options":"nosniff","Connection":"keep-alive","Date":"Tue, 31 Oct 2023 11:49:13 GMT","X-Frame-Options":"DENY","Strict-Transport-Security":"max-age=31536000","CF-Cache-Status":"DYNAMIC","Content-Length":"158","X-XSS-Protection":"1; mode=block","Content-Type":"application/scim+json"},"message":{"schemas":"urn:ietf:params:scim:api:messages:2.0:Error","detail":"User with the name: XLDOMAIN${user.username} already exists in the system.","status":"409"},"statusCode":409,"description":null,"status":"Failed"}]},"call1":{"headers":{"Server":"cloudflare","CF-RAY":"81ebacfe5a956cf0-CGK","X-Content-Type-Options":"nosniff","Connection":"keep-alive","Date":"Tue, 31 Oct 2023 11:49:37 GMT","X-Frame-Options":"DENY","Strict-Transport-Security":"max-age=31536000","CF-Cache-Status":"DYNAMIC","Content-Length":"158","X-XSS-Protection":"1; mode=block","Content-Type":"application/scim+json"},"message":{"schemas":"urn:ietf:params:scim:api:messages:2.0:Error","detail":"User with the name: XLDOMAIN${user.username} already exists in the system.","status":"409"},"statusCode":409,"description":null,"status":"Failed"}}

 

{"auditDetails":{"call1":[{"headers":{"Server":"cloudflare","CF-RAY":"81ebac681b764abd-CGK","X-Content-Type-Options":"nosniff","Connection":"keep-alive","Date":"Tue, 31 Oct 2023 11:49:13 GMT","X-Frame-Options":"DENY","Strict-Transport-Security":"max-age=31536000","CF-Cache-Status":"DYNAMIC","Content-Length":"158","X-XSS-Protection":"1; mode=block","Content-Type":"application/scim+json"},"message":{"schemas":"urn:ietf:params:scim:api:messages:2.0:Error","detail":"User with the name: XLDOMAIN${user.username} already exists in the system.","status":"409"},"statusCode":409,"description":null,"status":"Failed"}]},"call1":{"headers":{"Server":"cloudflare","CF-RAY":"81ebacfe5a956cf0-CGK","X-Content-Type-Options":"nosniff","Connection":"keep-alive","Date":"Tue, 31 Oct 2023 11:49:37 GMT","X-Frame-Options":"DENY","Strict-Transport-Security":"max-age=31536000","CF-Cache-Status":"DYNAMIC","Content-Length":"158","X-XSS-Protection":"1; mode=block","Content-Type":"application/scim+json"},"message":{"schemas":"urn:ietf:params:scim:api:messages:2.0:Error","detail":"User with the name: XLDOMAIN${user.username} already exists in the system.","status":"409"},"statusCode":409,"description":null,"status":"Failed"}}

@kolipakularavi 

Error","detail":"User with the name: XLDOMAIN${user.username} already exists in the system.","status":"409"},

Does this user already have account in target?

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

SumathiSomala
All-Star
All-Star

@kolipakularavi Try with 2 backslash

"httpParams": "{ \"schemas\":\"\", \"userName\":\"XLDOMAIN\\${user.username}\", \"emails\":[{\"primary\":true,\"value\":\"${user.email}\"}],\"password\":\"123K\"}",

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

sorry for the confusion sumathi.

with the below configuration setting only below error populated.

"httpParams": "{ \"schemas\":\"\", \"userName\":\"XLDOMAIN\\${user.username}\", \"emails\":[{\"primary\":true,\"value\":\"${user.email}\"}],\"password\":\"123K\"}",

Error","detail":"User with the name: XLDOMAIN${user.username} already exists in the system.","status":"409"},

@kolipakularavi error says that user with the name already exist.

are you getting same error for different test users aswell?

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.