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

how do we use dyanmic attribute of AccountType from "Manage Service Account"

ejeong
Valued Contributor
Valued Contributor

I need to pass accounttype when is selected in AccountType via "Manage Service Account" in CreateAccountJSON. How we do fetch this dynamic attribute name in CreateaccountJSON?

if this is null then I want to pass "PERSONAL" as hardcoded

ejeong_0-1656565355146.png

 

11 REPLIES 11

Sharukh_Shaikh
New Contributor III
New Contributor III

Hi ,

Can you please mention which connecter you are using?

Thanks,

Sharukh

ejeong
Valued Contributor
Valued Contributor

Hi. I am using REST Connector

Hi ,

Can you try the below JSON:

\"TargetAttribute\":\"${{requestAccessAttributes.get('Dynamic_Attribute_Name_here')} else {'PERSONAL'}}\",

 

But I can see the Field is mandatory so the else condition will never be set.

Thanks,

Sharukh.

ejeong
Valued Contributor
Valued Contributor

Thank you. Could you please let me know for AD as well? 

ejeong
Valued Contributor
Valued Contributor

what I am expecting is 

if user request account via "Manage Service Account" then account type should be passed as "ServiceAccount" 

If user request account via "Request Access" then account type should be passed as "PERSONAL"

Since it's using with one connection, I thought I have to use "if-else" condition in CreateAccountJSON

sahajranajee
Saviynt Employee
Saviynt Employee

Hello,

You should be able to use :
"${requestAccessAttributes.get('TimezoneCode')}"

 


Regards,
Sahaj Ranajee
Sr. Product Specialist

ejeong
Valued Contributor
Valued Contributor

Thanks. can we use that in both AD and REST connector? 

Also could you please confirm about use cas I shared above?

what I am expecting is 

if user request account via "Manage Service Account" then account type should be passed as "ServiceAccount" 

If user request account via "Request Access" then account type should be passed as "PERSONAL"

Since it's using with one connection, I thought I have to use "if-else" condition in CreateAccountJSON

sahajranajee
Saviynt Employee
Saviynt Employee

Hello,

You can try something like :
"targetAttribute": "${if(requestAccessAttributes.get('ACCOUNTTYPE') == 'Service Account'){'ServiceAccount'} else {'Personal'}}"

Note : ACCOUNTTYPE would be storing the Service Account type selected by the user on the Manage Service Account request screen.

 


Regards,
Sahaj Ranajee
Sr. Product Specialist

angela
New Contributor III
New Contributor III

Is there a different variable for a database connector? I've tried 

requestAccessAttributes.get('ACCOUNTTYPE') which works in a Rest and ServiceAccountOwnerMap.ServiceAccountType works for an AD connection but in a DB Connection am getting:
No signature of method: java.lang.String.get() is applicable for argument types: (java.lang.String) values: [ACCOUNTTYPE]

${ACCOUNTTYPE}

Please share json if does not work


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

${ACCOUNTTYPE} works in both our DB and SOAP connections. Thanks for your help!