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 - CreateAccount call Failing

anandshahgrange
New Contributor III
New Contributor III

CreateAccount call is failing with the following Provisioning Comments.

{"auditDetails":{"CreateAccount":[{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"},{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"},{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}]},"CreateAccount":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}

Where am I going wrong?

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

Share create account json and postman 

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'.

anandshahgrange
New Contributor III
New Contributor III

{
"accountIdPath": "CreateAccount.message.userid",
"call": [
{
"name": "CreateAccount",
"connection": "GConnectionMdl",
"url": "https://server/createUserMapping",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{ \"UserName\": \"${user.systemUserName}\", \"mUserName\": \"${account}\", \"deptCode\": \"${departmentcode} \"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": "[200,201]"
},
"unsuccessResponses": {
"statusCode": "[400, 404, 500]"
}
}
]
}

There no object with ${account} in rest connector change it to ${accountsObj?.name}

https://docs.saviyntcloud.com/bundle/EIC-Connectors/page/Content/Binding-Variables-for-Provisioning-...


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

The ${account} is not a Saviynt object. It is a custom attribute on my endpoint.

I changed it to rfaccount. Same with ${departmentcode}

These are custom attributes of my endpoint, not referring to the Saviynt accounts table.

 

example:

{
"accountIdPath": "CreateAccount.message.userid",
"call": [
{
"name": "CreateAccount",
"connection": "GConnectionMdl",
"url": "https://server/createUserMapping",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{ \"UserName\": \"${user.systemUserName}\", \"mUserName\": \"${rfaccount}\", \"deptCode\": \"${departmentcode} \"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": "[200,201]"
},
"unsuccessResponses": {
"statusCode": "[400, 404, 500]"
}
}
]
}

Please share dynamic attribute screenshot


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

anandshahgrange
New Contributor III
New Contributor III

postman request body

{
"UserName": "c-maprus",
"mUserName": "TTTSXK",
"deptCode": "DRYERTA"
}

 

Response:

{
    "status""Success",
    "message""The Network Username created successfully."
}