Hi All,
I have added a attribute on identity profile mappings and trying to get memberOf values for a identitywith NO TRANSFORM added yet but in the preview, I only see one value. I want to know if it will read all the memberOf attributes so I can apply transform.
Please let me know how this attribute works. TIA
MVKR7T
(Krishna Mummadi)
May 10, 2024, 4:04pm
2
Hi
You get only one value by default when you read multi-valued attribute.
If your requirement is to check if user has a specific group or not then you can use below Transform.
{
"name": "MultiValued Static Transform",
"type": "static",
"attributes": {
"HasABC": {
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"attributeName": "anyAccountAttribute",
"sourceName": "sourceName",
"accountPropertyFilter": "(attributeName.contains(\"ABC\"))"
}
},
{
"attributes": {
"value": "none"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"value": "#if ($HasABC != 'none') Yes #else No #end"
},
"internal": false
}
Thanks
Krish
4 Likes
Thanks @MVKR7T , This is helpful, let me build the transform and see if it works.
1 Like
MVKR7T
(Krishna Mummadi)
May 10, 2024, 4:10pm
5
If you would like to display all the Groups for a user, you can use below Transform.
{
"name": "Get Multi Values Static Transform",
"type": "static",
"attributes": {
"value": "#foreach($link in $identity.getLinksByAppIdOrName(\"source name or id\",null))#if($foreach.index + 1 != $identity.getLinks().size())$link.getAttribute("memberOf")(),#else$link.getAttribute("memberOf")#end#end"
},
"internal": false
}
7 Likes
jesvin90
(Jesvin Joseph)
May 10, 2024, 4:16pm
6
Hi @MVKR7T ,
That’s cool.
Can this transform be used for getting any of the multivalued attributes from a source into an Identity attribute.? or this is limited to only the memberof value.?
MVKR7T
(Krishna Mummadi)
May 10, 2024, 4:18pm
7
It works for any attribute, basically you are iterating user account(s) and extracting account attributes. Even I didn’t know that this is supported till this discussion, check it has good info.
I want to use one transform to display more than one account for one of my application. Lets say the field name is ACCOUNT_NAME which has multiple ids for one user in oracle db… can someone suggest me transform example to display all account ids associated for one user. Currently only one account id is displaying without using transform.
3 Likes
This transforms works for me.Thanks @MVKR7T
{
“name”: “Get Multi Values Static Transform”,
“type”: “static”,
“attributes”: {
“value”: “#foreach ($link in $identity.getLinksByAppIdOrName("source name or id",null))#if ($foreach.index + 1 != $identity.getLinks().size())$link.getAttribute(“memberOf”)(),#else$link.getAttribute(“memberOf”)#end #end”
},
“internal”: false
}
system
(system)
Closed
July 12, 2024, 3:47pm
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.