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 Connector - CreateAccountJSON - accountIdPath - User attribute

DG1811
New Contributor III
New Contributor III

Hi Team,

Connector used: REST
I am facing some issue with account Id Path in Create Account JSON for REST application. Below is the CreateAccount JSON that we are using. 

{
"accountIdPath": "call1.message",
"responseColsToPropsMap": {
"accountID": "@UniqueID~#~char"
},
"call": [
{
"connection": "acctAuth",
"name": "call1",
"url": "http://xxxxx/names.nsf/api/data/xxxxxxxx",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"ContentType": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}

User is getting created and also access is getting mapped. Post account creation,  there is a UniqueID that is being created in the application end against that user. We need to map this generated unique Id to accountID attribute in user's account when we perform the recon. 

Also note, the unique attribute is not coming in response, we jsut have 201 created in the response. 

Could you please review the JSON and help me get the uniqueid in the accountid field.in updating the createaccount json accordingly.

Also I am attaching the importaccountjson too for reference.
Please suggest.

Thanks

15 REPLIES 15

NM
Esteemed Contributor
Esteemed Contributor

Hi @DG1811 , if unique id is not coming in response you will not be able to map it at the time of account creation.

"accountIdPath": "accountName" use this.

 


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

DG1811
New Contributor III
New Contributor III

Hi @NM ,
We have also tried with the accountName too, it did not work. 

So if we are getting the unique ID in the response how can we get the data for the manually provisioned user?

NM
Esteemed Contributor
Esteemed Contributor

@DG1811 share you API response.


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

DG1811
New Contributor III
New Contributor III

Hi @NM ,

Please find the attached snapshot.

Thanks

You have share user creation API screenshot. need get url for users.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'.

Hi @rushikeshvartak ,

The Get Url for users is already present in the import account json that o attached in the ticket. Its a combination of two API, CALL1 pulls the users and second API pull the attributes. 

thanks 

Your API is not returning account ID hence  use below 

"accountIdPath": "accountName" use this.


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

Hi @rushikeshvartak ,

So you want me try the below format?

{
"accountIdPath": "accountName",
"call": [
{
"connection": "acctAuth",
"name": "call1",
"url": "http://xxxxx/names.nsf/api/data/xxxxxxxx",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"ContentType": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}

If yes, then we have already tried this. It did not work. 

Could you kindly provide a detailed snapshot of the information extracted from the logs, encompassing errors and other pertinent functionality details encountered during the execution of this process? Your assistance in furnishing this information would greatly aid in the analysis and resolution of any issues .



‼️‼️⚠️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'.

Hi @rushikeshvartak ,

We have ran a create account task for a user and ran the provisioning job.

The user (edited for confidentiality) : testuser, email as testuser name@.

After that we ran a import account job (full), it did not pull the user.

 

  • Does account creation working from postman ?

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

NM
Esteemed Contributor
Esteemed Contributor

Hi @DG1811 , when you did a a get call from postman do you see the account created from saviynt?


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

DG1811
New Contributor III
New Contributor III

Hi @rushikeshvartak / @NM ,

Just an update, as you see, we have two calls in importaccountjson.
Call1 pulls the collection of user and call2 pulls the user based on the accountid field retrieved in call1.

Now in create accountjson we are creating the user in call2 API. 
I suppose there lyes the problem, as its unable to find the user in call1 so, it is not pulling the data.

Can you please suggest a createjson format using two calls. which can serve the process.

 

Try creating accounts from postman


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

NM
Esteemed Contributor
Esteemed Contributor

Hi @DG1811 , as per your previous reply, I only see one call in create account json


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