GeneralException Error in Transform

Hello Everyone,

We have added a transform to fetch identity attribute UPN from AD account attribute userPrincipalName. Transform has been mapped but with this transform mapping, identity attribute still throws below error:

sailpoint.tools.GeneralException: could not resolve property: upn of: sailpoint.object.Identity

{
        "name": "FirstValid_Transform_Attribute_Updated",
        "type": "static",
        "attributes": {
      "upn" : {
        "attributes": {
          "values": [
            {
              "attributes": {
                "sourceName": "Active Directory",
                "attributeName": "userPrincipalName"
              },
              "type": "accountAttribute"
            },
            {
              "attributes": {
              "value": "empty"
              },
              "type": "static"
            }
          ]
        },
        "type": "firstValid",
        "ignoreErrors": "true"
      },
      "value": "#if($upn != 'empty')$upn#end"
        }
    }

Let us know if anyone faced this issue earlier.

Thanks

Hi @Sgupta1

Welcome to SailPoint Developer Community.

Before debugging the Transform, why don’t you simply use the mapping without any Transform.

Under your Identity Profile, for UPN identity attribute
Source: AD
Attribute: userPrincipalName

You get the value if you have if not empty. What made you to choose the Transform ?

I tested your Transform, it is working fine. Where exactly you are getting this error, do you have upn identity attribute in your Identity Profile ?

Thanks
Krish

Hi Shikha

From what I understand, you are trying to set the value of the AD upn or else the static value of “empty” when no AD upn is found, if this is the case, then there isn’t any need to use the conditional statement but you can simplify by just using the first valid transform like this:

{
  "attributes": {
    "values": [
      {
        "attributes": {
          "sourceName": "Active Directory",
          "attributeName": "userPrincipalName"
        },
        "type": "accountAttribute"
      },
      {
        "attributes": {
        "value": "empty"
        },
        "type": "static"
      }
    ]
  },
  "type": "firstValid",
  "name": "FirstValid_Transform_Attribute_Updated"
}
2 Likes

Hi Shikha,
As Irshaad suggested, first valid is right for your case. I am having similar requirement and we fixed with first valid, we had to check authoritative source as well before going to empty. So authoritative source comes as second check in first valid.
Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.