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

"Username already exists and its pending for approval" error while user creation

SmitaSJ
New Contributor
New Contributor

Hi,

We have created customized user creation form with 3 user types. 
Username should be 7 digit number starting from the given series. For example - 0012345 and it should be auto incremented.

Getting "Username already exists and its pending for approval" error while submitting another request when there are requests pending for approval. If there's no request pending then it's working fine.

We are using below advance config for username generation rule.

SELECT LPAD((CAST((CAST(username AS UNSIGNED) +1) AS CHAR)),7,'0') as Id FROM users ORDER BY CAST(username AS UNSIGNED) DESC LIMIT 1

There are few username starting with letters, that's why using CAST in above query. Using hide/show for attributes according to selected user type. 

Approval workflow is implemented based on department attribute. It will get auto approved or go for the approval. 

Our understanding is username gets generated once we approve the request. Not sure why we are getting error while submitting the user creation request. 

Please help us to resolve this issue. 


 

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

Can you share logs


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

SmitaSJ
New Contributor
New Contributor

There's no error related to this in logs. Getting below error on UI and it's not allowing to submit request. 

SmitaSJ_0-1706536346544.png

One observation, not getting error when there's username present in bracket for pending requests or it's null. Getting error in case where only empty brackets are added. 

From below shared image, only top row is causing the issue (Harry123 H ()). It's working fine if I keep other requests pending except the top one.

SmitaSJ_1-1706536568040.png

 

 

tanvi_gaikwad
New Contributor II
New Contributor II

Hello Saviynt Team, 

Need assistance with the resolution of the above error. Please suggest a meeting time for IST time zone to look into this issue further as it is affecting our delivery.

Hi @tanvi_gaikwad 

This is expected, if a request is already present for same username then it will not allow you to raise.

You need check for the username from request attrss table as well in the adavance config to exclude the username in any pending requests as well.

 

Thanks

Darshan

Hi Darshan,

Can you please share exact table name and column name where we can check username from pending requests? I tried to find it but didn't find it. 

 

Thanks,
Smita

Table name : request_access_attrs 

Column name raa.attribute_name = 'DYnamic attribute Name'


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

Hi @SmitaSJ 

 

Pls refer to this sample example :

select cast(max(username)+1 as SIGNED) as ID from users where username like '810%'
       union all
         select cast(max(ATTRIBUTE_VALUE)+1 as SIGNED) as ID from request_access_attrs where ATTRIBUTE_NAME = "username"
                  and ATTRIBUTE_VALUE like '810%' order by ID desc limit 1 ;

Here username is the dynamic attribute name

 

Thanks

Darshan

Thanks Darshan. Username generation issue is resolved using this query for dynamic attribute.

tanvi_gaikwad
New Contributor II
New Contributor II

Our understanding is that the username is generated when the request for user creation is approved. Since our requests are in pending state, there are no duplicate usernames, thus there should not be username conflict. Can you please suggest a meeting in IST timezone

Hi @tanvi_gaikwad ,

No once a request is already present for approval we shouldnt have ang request for same username as there is a chance that both can get approved. 
so we dont allow usernames which are pending for approval.

please add the condition as i said and that should work.

Also we wont be able to setup any call from this platform as its how to questions, if needed please take ES service if you need help around implementation.

we can guide over the suggestions and provide the product behaviour via this platform.

Thanks

Darshan

Refer sample :

 https://forums.saviynt.com/t5/identity-governance/username-generation-rule/m-p/11630


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