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

Add logic to CREATEACCOUNT JSON

piotrj
New Contributor III
New Contributor III

Hi All,

We would like to add logic to the CREATEACCOUNT JSON which set different display name depending on users CP1.

We have tried this:

"displayName": "${user?.customproperty1.startsWith('RX)? user?.lastname + ', ' + user?.firstname + ' (RX)' : user?.lastname + ', ' + user?.firstname}",

but it doesn't work. Any help appreciated.

3 REPLIES 3

Ishan
Saviynt Employee
Saviynt Employee

You can try this:

 

"displayName":"${(user.lastname+', '+user.firstname+ (user.customproperty1.startsWith('RX')?('RX'):''))}"

 

Ishan Kamat
Technical Architect, Professional Services
SaviyntLogo.png

piotrj
New Contributor III
New Contributor III

Thank you Ishan, still doesn't work.

I put the following line in:

"displayName": "${(user?.lastname + ', ' + user?.firstname + (user.customproperty1.startsWith('RX')? ' (RX-Admin)' : ' (Admin)'))}",

And the response I get in the logs is:

2023-02-17 09:50:10,660 [quartzScheduler_Worker-1] DEBUG adsi.SaviyntGroovyADSIService - httpContentType : application/json
2023-02-17 09:50:10,660 [quartzScheduler_Worker-1] DEBUG services.HttpClientUtilityService - isFipsEnabled = false
2023-02-17 09:50:10,660 [quartzScheduler_Worker-1] DEBUG services.HttpClientUtilityService - getHttpClient - sslParams : null
2023-02-17 09:50:10,660 [quartzScheduler_Worker-1] DEBUG services.HttpClientUtilityService - getHttpClient - proxyParams : null
2023-02-17 09:50:10,660 [quartzScheduler_Worker-1] DEBUG services.HttpClientUtilityService - getHttpClient - sslSocketFactory : null
2023-02-17 09:50:10,662 [quartzScheduler_Worker-1] DEBUG services.HttpClientUtilityService - getHttpClient - HttpClientBuilder.create().build() called.
2023-02-17 09:50:13,479 [quartzScheduler_Worker-1] DEBUG adsi.SaviyntGroovyADSIService - Inside else of statusCode?.toString()?.startsWith(2)
2023-02-17 09:50:13,479 [quartzScheduler_Worker-1] DEBUG adsi.SaviyntGroovyADSIService - accountResponse : [:]
2023-02-17 09:50:13,480 [quartzScheduler_Worker-1] DEBUG adsi.SaviyntGroovyADSIService - Error while creating account: null
2023-02-17 09:50:13,503 [quartzScheduler_Worker-1] DEBUG services.ArsTaskService - Inside updateProvisioningTries..

 

Kind regards,

Piotr

piotrj
New Contributor III
New Contributor III

Just to update Ishan reply above resolved the issue. We discovered a typo error in the other part of  create account JSON. Thank you for your help!