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

Class to get the user attributes by username instead of userkey

yogesh2
Regular Contributor II
Regular Contributor II
com.saviynt.ecm.identitywarehouse.domain.Users.get("<userkey>")?.customproperty31
 
above class can fetch the user properties in connection jsons from userkey, is there a way to get the user attributes by username?
 
somthing like this :
com.saviynt.ecm.identitywarehouse.domain.Users.findByUsername("testuser")?.customproperty31
3 REPLIES 3

rushikeshvartak
All-Star
All-Star

${com.saviynt.ecm.identitywarehouse.domain.Users.get(user?.manager)?.username} 


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

yogesh2
Regular Contributor II
Regular Contributor II

I dont want to get the manager's attributes.

I am trying to get the customproperty31 of the rank1 owner of the entitlement (not from the role object), and I can get the owner's username like this:

entitlementValuesObj.ownerRank1[0]
 
but this doesn't work:
entitlementValuesObj.ownerRank1[0].customproperty31
 
Hence I posted this question.
 
I am using this in createUpdateMappings json and here is the full json, I am trying to set the managedBy attribute of the group in AD: 

 

	"cn": "${role?.customproperty27}",
	"objectCategory": "CN=Group,CN=Schema,CN=Configuration,DC=rootq,DC=com",
	"displayName": "${role?.displayname}",
	"sAMAccountName": "${role?.customproperty27}",
	"description": "${role?.description}",
	"extensionAttribute13": "${if(role?.customproperty21?.equals('Security')) {''} else {'MailEnabled'}}",
	"objectClass": "group",
	"name": "${role?.customproperty27}",
	"groupType": "${role?.customproperty21 == 'Mail Enabled Security Group' && role?.customproperty22 == 'Universal'?'-2147483640':role?.customproperty21 == 'Security' && role?.customproperty22 == 'Global'?'-2147483646':role?.customproperty21=='Security'&&role?.customproperty22=='Universal'?'-2147483640' : role?.customproperty21== 'Security'&&role?.customproperty22=='Domain Local'?'-2147483644':role?.customproperty21=='Distribution'&&role?.customproperty22=='Global'?'2':role?.customproperty21=='Distribution'&&role?.customproperty22=='Universal'?'8':role?.customproperty21=='Distribution'&& role?.customproperty22=='Domain Local'?'4':''}",
	"managedBy": "${entitlementValuesObj.ownerRank1[0].customproperty31}"

 

entitlementValuesObj is entitlement_values object


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