Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/25/2024 06:50 AM
I have an issue where I am unable to concatenate the userkey of the user (created from the 'create user request' form for vendors) when sending it as the employeeid to Azure via REST API.
The employeeid generation logic is as follows:
Take the first character of EmployeeClass and concatenate it with the userkey generated within Saviynt after the user is created. EmployeeClass can have values like External, Vendor, and Mill. Therefore, the employeeid will be 'V-', 'E-', or 'M-' followed by the userkey.
Below are the logics I have tried:
I used this string in JSON ${user.employeeclass.substring(0,1).concat('-').concat(user.id)}, but it didn't work; the complete JSON is not getting evaluated. I have attached the logs.
To test if the issue is with user.id, I tried sending only part of it. When I used ${user.employeeclass.substring(0,1).concat('-')}, the JSON was evaluated correctly and 'V-' was sent as employeeid when the employee class was 'Vendor'. However, it breaks when I add user.id.
Attaching the createaccountjsons and logs for both scenarios I tested.
Could you please let me know how I can fulfill this use case and what changes I need to make in that Groovy string?
Solved! Go to Solution.
06/25/2024 07:38 AM
I am able to make this work, below is the correct syntax
${user.employeeclass.substring(0,1).concat('-'+user.id)}