# Account Attribute Transform using IdentityAttribute in AccountFilter

**URL:** <https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud\
**Created:** [September 12, 2025, 8:52am UTC](https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986 "2025-09-12T08:52:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablonovoa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pablonovoa/32/18573_2.png) [@pablonovoa](https://developer.sailpoint.com/discuss/u/pablonovoa)\
**Post date:** [September 12, 2025, 8:52am UTC](https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986/1 "2025-09-12T08:52:24Z")

</div>

Hello Everyone,

We are facing a problem with an account attribute transform.

We are using an accountfilter based on the account name (displayname) and it is working fine if the value is static. But our goal is to use the filter if the displayname equals to an identityattribute.

We tried with this transform but it is not working, it is working if i replace the idAccount variable to an static value

```auto
{
    "name": "Calculate actual Job",
    "type": "static",
    "attributes": {
        "idAccount": {
            "type": "identityAttribute",
            "attributes": {
                "name": "idJob"
            }
        },
        "job": {
            "type": "accountAttribute",
            "attributes": {
                "sourceName": "SourceJobs",
                "attributeName": "Job",
                "accountFilter": "(displayName == \"$idAccount\")"
            }
        },
        "value": "$job"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![Carlatto](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/carlatto/32/4764_2.png) [@Carlatto](https://developer.sailpoint.com/discuss/u/Carlatto)\
**Post date:** [September 12, 2025, 4:11pm UTC](https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986/2 "2025-09-12T16:11:44Z")

</div>

From my experience, accountFilter only takes in a static string.

---

<div class="post-metadata">

**Author:** ![KevinHarrington](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kevinharrington/32/6776_2.png) [@KevinHarrington](https://developer.sailpoint.com/discuss/u/KevinHarrington)\
**Post date:** [September 12, 2025, 4:31pm UTC](https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986/3 "2025-09-12T16:31:28Z")

</div>

The “idAccount” variable is only available in the “value” tag. It is not available in the “job” tag. You’d need to refactor this if you want the “accountAttribute” lookup to work. Also, the accountAttribute transform only looks up values on accounts that are associated to the user - which, maybe they are in this scenario, I’m just having a bit of a hard time envisioning what this source looks like.

Assuming the “SourceJobs” records are correlated to the user, you could refactor the transform to look something like this:

```auto
{
    "name": "Calculate actual Job",
    "type": "accountAttribute",
    "attributes": {
        "sourceName": "SourceJobs",
        "attributeName": "Job",
        "accountFilter": {
            "attributes":{
                "idJob":{
                   "type": "identityAttribute",
                    "attributes": {
                        "name": "idJob"
                    }
                },
                "value": "(displayName == \"$idJob\")"
            },
            "type":"static"
        }
    },
    "internal": false
}

```

And I haven’t tested, but I kind of think something like the following might actually work:

```auto
{
    "name": "Calculate actual Job",
    "type": "accountAttribute",
    "attributes": {
        "sourceName": "SourceJobs",
        "attributeName": "Job",
        "accountFilter": "(displayName == \"$identity.attributes.idJob\")"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![pablonovoa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pablonovoa/32/18573_2.png) [@pablonovoa](https://developer.sailpoint.com/discuss/u/pablonovoa)\
**Post date:** [September 15, 2025, 7:32am UTC](https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986/4 "2025-09-15T07:32:14Z")

</div>

Thanks @KevinHarrington

The correct way was the first code.

Kind regards,

Pablo

---

<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:** [November 14, 2025, 7:32am UTC](https://developer.sailpoint.com/discuss/t/account-attribute-transform-using-identityattribute-in-accountfilter/178986/5 "2025-11-14T07:32:15Z")

</div>

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