# GeneralException Error in Transform

**URL:** <https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud\
**Created:** [May 17, 2024, 8:33am UTC](https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062 "2024-05-17T08:33:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sgupta1](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@Sgupta1](https://developer.sailpoint.com/discuss/u/Sgupta1)\
**Post date:** [May 17, 2024, 8:33am UTC](https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062/1 "2024-05-17T08:33:37Z")

</div>

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`

```json
{
        "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

---

<div class="post-metadata">

**Author:** ![KRM7](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/krm7/32/2685_2.png) [@KRM7](https://developer.sailpoint.com/discuss/u/KRM7)\
**Post date:** [May 17, 2024, 9:10am UTC](https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062/2 "2024-05-17T09:10:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Irshaad\_Laher\_WS](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/irshaad_laher_ws/32/12713_2.png) [@Irshaad\_Laher\_WS](https://developer.sailpoint.com/discuss/u/Irshaad_Laher_WS)\
**Post date:** [May 23, 2024, 4:48am UTC](https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062/3 "2024-05-23T04:48:06Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![girishkms1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/girishkms1/32/10956_2.png) [@girishkms1](https://developer.sailpoint.com/discuss/u/girishkms1)\
**Post date:** [May 23, 2024, 7:01am UTC](https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062/4 "2024-05-23T07:01:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 22, 2024, 7:01am UTC](https://developer.sailpoint.com/discuss/t/generalexception-error-in-transform/57062/5 "2024-07-22T07:01:47Z")

</div>

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