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

Unable to Create Account in REST based Connector. Error: Illegal value for field: email

rohitkumarraj
Regular Contributor
Regular Contributor

Hi,

I am working on a REST based connector for an endpoint. 

To create an account, Below is the Create Account JSON I have configured:

***********************************

{
"accountIdPath": "call.message.id",
"responseColsToPropsMap": {
"customproperty5": "call.message.id~#~char ",
"customproperty1": "version~#~char"
},
"call": [
{
"name": "call",
"connection": "userAuth",
"showResponse": true,
"url": "https:URL/api/v2/users",
"httpMethod": "POST",
"httpParams": "{\"name\": \"${user.firstname} ${user.lastname}\",\"email\": \"${user.email}\",\"password\":\"Abcd1234$\",\"divisionId\":\"75558435-5a52-43bf-b8a5-bb703c152b\",\"state\":\"active\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
202
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
429,
500,
503
]
}
}
]
}

*********************************

The same JSON works fine when i hard code the value of firstname, lastname and email. Account getting created in Target system, BUT when i try using binding variable to pick the value dynamically, I am getting below error in Logs:

******************************************

2022-05-30/07:48:38.736 [quartzScheduler_Worker-12] DEBUG rest.RestProvisioningService - configJSON: [showLogs:true]
2022-05-30/07:48:38.736 [quartzScheduler_Worker-12] DEBUG rest.RestProvisioningService - email: xxxxxx@saviynt.com
2022-05-30/07:48:38.736 [quartzScheduler_Worker-12] DEBUG rest.RestProvisioningService - Calling createNewUser

After few lines of calling webservice url... [ couldn't share the logs line due to client confidentiality]

2022-05-30/07:48:38.736 [quartzScheduler_Worker-12] DEBUG rest.RestProvisioningService - accountId: null

Task Response: {"auditDetails":{"call":[{"headers":{"Transfer-Encoding":"chunked","X-Cache":"Error from cloudfront","Strict-Transport-Security":"max-age=600; includeSubDomains","Cache-Control":"no-cache, no-store, must-revalidate","X-Amz-Cf-Pop":"DUB56-P1","Connection":"keep-alive","X-Amz-Cf-Id":"Cy4klAfCbvyEdYMyrDR_qnDGa2UcEnUWi4laLG-fVW00zA5JzOgOkQ==","ININ-Correlation-Id":"f6b2a7f1-4108-4fc1-bb46-477c6540a7dc","Date":"Mon, 30 May 2022 07:13:56 GMT","Content-Type":"application/json","Via":"1.1 fc92265e3899c24180ac56d6646eec4a.cloudfront.net (CloudFront)"},"message":{"message":"Validation error(s): [API Exception 400:\"Bad Request\" : Illegal value for field: email, Reason: Not a valid email address.]","code":"general.bad.request","status":400,"messageParams":{"fieldName":"email","errorCode":"GENERAL_BAD_REQUEST"},"contextId":"f6b2a7f1-4108-4fc1-bb46-477c6540a7dc","details":[],"errors":[]},"statusCode":400,"description":null,"status":"Failed"}]},"call":{"headers":{"Transfer-Encoding":"chunked","X-Cache":"Error from cloudfront","Strict-Transport-Security":"max-age=600; includeSubDomains","Cache-Control":"no-cache, no-store, must-revalidate","X-Amz-Cf-Pop":"DUB56-P1","Connection":"keep-alive","X-Amz-Cf-Id":"0TsetXPhRt8WrJzH9EWY7qPqwpOF2amMJMJyA1wp6FZK3XVr4f7S8Q==","ININ-Correlation-Id":"dbcb4a46-a90c-4db7-9522-aade45280618","Date":"Mon, 30 May 2022 07:48:38 GMT","Content-Type":"application/json","Via":"1.1 fc92265e3899c24180ac56d6646eec4a.cloudfront.net (CloudFront)"},"message":{"message":"Validation error(s): [API Exception 400:\"Bad Request\" : Illegal value for field: email, Reason: Not a valid email address.]","code":"general.bad.request","status":400,"messageParams":{"fieldName":"email","errorCode":"GENERAL_BAD_REQUEST"},"contextId":"dbcb4a46-a90c-4db7-9522-aade45280618","details":[],"errors":[]},"statusCode":400,"description":null,"status":"Failed"}}
2022-05-30/07:48:38.736 [quartzScheduler_Worker-35] DEBUG rest.RestProvisioningService - accountResponseMap: null
2022-05-30/07:48:38.736 [quartzScheduler_Worker-35] DEBUG rest.RestProvisioningService - taskResult: false
2022-05-30/07:48:38.736 [quartzScheduler_Worker-35] DEBUG rest.RestProvisioningService - taskResult:: false
2022-05-30/07:48:38.736 [quartzScheduler_Worker-35] ERROR rest.RestProvisioningService - Error while creating account - TestSaviynt9 removing tasks from the list

*************************************

I am wondering why does Saviynt says, not a valid email address? As the same email when hardcoded works fine in Saviynt and even in Postman as well.

FYI, User email address is: xxxx@saviynt.com

Can anyone please have a look at the JSON configured and suggest me if I'm missing anything there?

Any help to resolve this would be highly appreciated.

 

Thanks

Rohit

2 REPLIES 2

rohitkumarraj
Regular Contributor
Regular Contributor

Suggestion from Saviynt on another thread:

Just a wild try, Try out by removing the $ for the password and see if the binding variables are resolving?

Behaviour: Even if any one of the Binding variable is misspelt / misused, none of the binding variables get resolved. 

On removing $ from Password field, resolved this issue!