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

Hiding admin accounts

RCreddy
New Contributor
New Contributor

Hello Team,

We have a required where Users with ROLE_ADMIN sav role should be the only one to request access for other users with ROLE_ADMIN. 

If the user is having Enduser savrole then that should not be able to request for the user who is having Admin Savrole.

We are trying to acheive it by Admin-->identity repository-->Savroles-->Advanced query

Can someone help me with the sample query.

Regards,

Rashmitha

8 REPLIES 8

rushikeshvartak
All-Star
All-Star

Hide on request for access ?


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

RCreddy
New Contributor
New Contributor

Hello Rushikesh,

Yes whenever the user is raising for the request access for others, the ADMIN accounts should be hide for the users who is having enduser savrole.

Regards,

Rashmitha

You can manage in access query of endpoint

userkey not in(select userkey from user_savroles where rolekey=1)


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

naveenss
All-Star
All-Star

Hi @RCreddy ,

If your requirement is to not show the endusers savroles users with the users having ROLE_ADMIN sav role. Try the below query in the "Whom to Request" option as a JSON in the ROLE_ENDUSER sav role.

[{"for":"RequestAccessforOthers","query":"select a from Users a where a.statuskey = 1 and a.id not in (select userkey from User_savroles where rolekey=1)"}]

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

RCreddy
New Contributor
New Contributor

Hello @naveenss our requirement is if the user is having Enduser savrole then that user should not be able to request for the user who is having Admin Savrole.

We have tried with the below query, and we are able to see only one user under request for others tab

[{"for":"RequestAccessforOthers","query":"select a from Users a where a.statuskey = 1 and a.id not in (select userkey from User_savroles where rolekey=1)"}]

can you execute the below query in data analyzer and see how many records you're getting?

 

select count(1) from users a where a.statuskey = 1 and a.userkey not in (select userkey from user_savroles where rolekey=1)

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

RCreddy
New Contributor
New Contributor

Hello @naveenss , I am fetching more than 10k records.

As part of testing we have created one Enduser savrole and testing with the below query and able to see all the records i mean more than 10k records under request access for others.

[{"for":"RequestAccessforOthers","query":"select a from Users a where a.statuskey = 1 and a.id not in (select userkey from User_savroles where rolekey=1)"}]

Ok.  Is this resolved? Anymore open issues?

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.