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

Reject new Service Account request from ARS if more than 1 owner is added

mahafujkhan1
Regular Contributor
Regular Contributor

We are trying to create a workflow to reject the new Service Account request if more than 1 owner is added by the requestor.

We are using the below query in the if-Else block  following the solution - Solved: Re: Service Account Owner Restriction - Saviynt Forums - 81540

mahafujkhan1_0-1724294813968.png

 

However, we are getting the NullPointer exception in the log like below 

mahafujkhan1_1-1724294912240.png

The dynamicAttributesReqAccess  is showing blank in the log

mahafujkhan1_2-1724295006450.png

Below is the screenshot of the workflow 

mahafujkhan1_3-1724295082328.png

Any suggestion on how to resolve the issue?

[This post has been edited by a Moderator. We discourage the @ mention of other forum users or employees unless they have already involved themselves on the forum post.]

17 REPLIES 17

rushikeshvartak
All-Star
All-Star

Check value under request_access_attrs table

 

.a  


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

Hi @rushikeshvartak ,

The table is showing limited value like below

mahafujkhan1_1-1724302528046.png

 

 

This table is not showing any data related to the Service Account Owner.

Any idea how to get the list of the Owner in the workflow?

What is kind of request submitted?

  • new account ?
  • add owner ?
  •  

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

It's new account request. I am planning to implement the same solution for add owner as well.

Did you added owners during request ?

 


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

Yes. We are adding the owner during new account request.

  • Please share logs during request submission in text file.
  • Also share screenshot during request submission of step 3 
  • And data analyzer screenshot of request_access_attrs join with request_access & ars_requests table 

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

Hi @rushikeshvartak ,

The issue is resolved now. Initially, I created the serial workflow which caused the issue. Now I am able to fulfill the logics for new Service Account Creation, however, could you please help me with the modify Service Account Request?

How could we set the workflow to trigger during modify Service Account action to check if more than one Service Account Owners are added and if so then reject the request?

You can use same condition mentioned in initial post it works in create as well as modify case 


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

Thanks @rushikeshvartak 

Please click the 'Accept As Solution' button on the reply (or replies) that best answers your original question and hit 'Kudos' button 👍.


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

Hi @rushikeshvartak ,

We are using String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')).count(':[1]')==1 

in the wrkflow to identify if more than one owner is added to reject the request. This is working fine.

But if we are adding one owner with Primary Certifier rank, it's not working. So, the query is only working when the Owner is single and  the rank is Rank 1.

How could we see what's the variable is holding? I tried to search in the logs but no luck.

Do you have any recommendation on how can we modify the above query to allow single owner with Primary Certifier rank?

String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')).count(':[1]')==1  or String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')).count(':[26]')==1 


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

That works. Just querious, how do we know what's the variable dynamicAttributesReqAccess contains in order to modify or access some properties?

We don't have much documentation around that and also logs are not showing the variable values.

Just experience things 🙂


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

Hi @rushikeshvartak, Appreciate your help on this. Now, there is one test case where this query isn't working.

If we are request with 2 owner, 1 is rank 1 and another one is Primary Certifier  then the query is allowing the request creation.

As the query is checking if the number of rank1 or rank26 are equals=1.

Is there a way we could check there are more than 1 entries for owner field?
The current query - String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')).count(':[1]')==1  or String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')).count(':[26]')==1 

String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')) .replaceAll("[^:\\[1]", "").length() == 2 && String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')) .split(":\\[1]").length - 1 == 1 || String.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USERRANKJSON')) .split(":\\[26]").length - 1 == 1


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