Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Need to generate a custom unique identifier in Saviynt

gokul
Regular Contributor
Regular Contributor

Hi,

I would like to know how we can accomplish the following use case in Saviynt using the OOTB feature.

I need to generate the unique identifier for every user identity and store it in a user customproperty.

Here are the conditions for creating the unique identifier.

1. The first 6 digit should be randomly generated.

2. The last digit should be an alphabet derived from the checksum value of the preceding six random digits.

This unique identifier needs to be assigned to all users upon creation in Saviynt. Also we have to generate and assign to the existing user as well as an initial load.

Looking forward to your guidance on this matter.

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

SELECT
user_id,
CONCAT(
LPAD(FLOOR(RAND() * 1000000), 6, '0'), CHAR(65 + (SUM(ASCII(SUBSTRING(CAST(FLOOR(RAND() * 1000000) AS CHAR), 1, 1))) % 26))
) AS unique_identifier
FROM
users;


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

HI @rushikeshvartak 

Thanks for your reply.

I can't currently use the username field or systemusername field since both are already occupied. Therefore, I have to utilize a custom property for storing the unique identifier. Also, before updating it to the custom property, I have to ensure that the value is unique among all the Saviynt users. In this case where should I implement the provided query?

use preprocessor


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

In the preprocessor, how can we ensure that the generated ID is unique and does not exist for any user?

Also in the data analyzer for the above query, am getting an error says "Operation not allowed as you are entering a value that resembles or contains SQL query"