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

Populate Account Name in Dynamic Attribute

AS5278
Regular Contributor II
Regular Contributor II

Hi All,

Is there any way to populate the 'Account Name' in a dynamic attribute while raising a request?.

We are integrating GitHub with Saviynt. Here, creating an account through Saviynt implies adding the GitHub user account to the organization.

Now, since the GitHub account name might differ from the actual user name in the organization.(For example: User's username in Organization is 'DS5165' but his GitHub username is 'DS5165-1'), we have added a dynamic attribute field 'githubusername' of type 'STRING' where user needs enter his/her GitHub username while raising the request(New Account Request).

Our requirement is that once, the account is created in Saviynt(with the entered String in DA 'githubusername), from the next time onwards when user is raising a request for 'Modify Access' either: 1). We don't want the dynamic attribute 'githubusername' to appear at all

(or)

2). We want to pre-populate this DA with the account name..so that user need not enter the Github username again and again when they want to request access for any repository.

Is there any way we can achieve this?. I have tried using below ways:

1). Approach 1: Hide the 'githubusername' DA if the requestee already has an account in the GitHub endpoint.

By using a dummy DA 'dummy' whose value is '1' if the requestee already has an account in the GitHub endpoint in Saviynt, else value is '0'. The type of this DA is 'SQL ENUM'.

Value: Select (CASE WHEN COUNT(u.username)=1 THEN '1' ELSE '0' END) AS ID from users u inner join accounts a on u.secondaryemail = a.customproperty2 where u.userkey = ${requestee} and a.endpointkey=84

DefaultValue: Select (CASE WHEN COUNT(u.username)=1 THEN '1' ELSE '0' END) AS ID from users u inner join accounts a on u.secondaryemail = a.customproperty2 where u.userkey = ${requestee} and a.endpointkey=84

Note: User - Account correlation is happening based on the email. Email is stored in the accounts customproperty2. 

- Now based on this value..I tried SHOW/HIDE for the DA 'githubusername' using below action string in parent attribute 'dummy' with 'githubusername' set as child attribute.

ACTION STRING: HIDE###githubusername###1___SHOW###githubusername###0

The above logic works only if i manually select the value in the 'dummy' DA. So, by default when page loads ..let's say the value in this 'dummy' DA is populated as '1'..still the 'githubusername' is not hidden on ARS page load. But if I remove this value from 'dummy' or manually select 1 after removing ..it works fine and the DA 'githubusername' gets hidden. I do not know why this is happening!.

Approach 2: Pre-populate the DA 'githubusername' with the Account name of the requestee.

- The type of DA 'githubusername' is String. Tried setting the default value for this DA as:

select a.name AS ID from users u inner join accounts a on u.secondaryemail = a.customproperty2 where u.userkey = ${requestee} and a.endpointkey=84

This doesn't work at all.

I can't change the type of the DA to 'Single Select from SQL Query', as that would mean that usercannot type the github username in this field(In case of 'New Account' request), which we don't want.

Please guide if there is any way we can achieve our requirement.

Thanks,

Atul Singh

 

 

xurde
4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Implement logic in account name rule .


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

AS5278
Regular Contributor II
Regular Contributor II

@rushikeshvartak 

We are not actually creating an account in GitHub using Saviynt. For GitHub there is no API to directly create Account in GitHub. Creating GitHub account from Saviynt simply means adding that user to the 'xxxxxtechnologies' organization in GitHub. The GitHub account must be created by the user beforehand by registering on GitHub website and they need to note down their GitHub username and put it in this ARS form in the 'githubusername' DA.

Hence, we cannot use this in accountname rule as there is no particular pattern for GitHub accountname and only the user will know what their 'GitHub username' is. The user needs to type in their Github username in the ARS page while requesting to be a member of the organization. We have already implemented this part. The account name part is working fine. 

We just want that from next time onwards when user will be raising a 'Modify Access' request, this DA 'githubusername' should not appear for that user (or) this DA should be pre-populated with the GitHub accountname with which the account was created in Saviynt(The account was created using the String passed in the 'githubusername' DA. We used 'responseColsToProps' mapping to change account name once API was called and response received).

xurde

Is this GitHub Enterprise if yes we create user and APIs are available. In order to hide DA you can't use hide on update ?


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

AS5278
Regular Contributor II
Regular Contributor II

@rushikeshvartak 

1). Saviynt docs mentions that there are two versions and the JSONS are different for them:

AS5278_0-1706602495299.png

In our case it is the 'GitHub Cloud' version. But could you please mention the API being used for creating GitHub account in GitHub enterprise. I need to check if that API can be used for GitHub cloud as well.

2). I haven't checked the 'Hide on Update' checkbox. I will try that and update.

Thanks.

 

xurde