We need to store the date as output when the cost center code changes for a user can we do it through transform ?
Clarity: You are trying to log data changes from the HR source inside of Sailpoint as an identity attribute?
This cannot be achieved by a transform alone because transforms cannot detect attribute changes over time. You can use an Identity Attribute Changed trigger (workflow) to monitor cost center changes and set the date using ânow()â.
Transforms may work as a workaround using oldValue comparison.
yes we have created attribute datechangecostcneter in which need to store the date when cost center got change can u pls help ?
and that date can be stored from workflow to identity attribute?
Yes, we can store it using a workflow by updating a custom identity attribute with now() when costCenter changes.
@BBR1 has nailed it precisely. Do you have the workflows module though?
Is this a good workflow for my requirement
<{
ânameâ: âCost Center Change Workflowâ,
âdescriptionâ: âTriggers when cost center changes and updates modified dateâ,
âenabledâ: true,
âtriggerâ: {
âtypeâ: âEVENTâ,
âattributesâ: {
âidâ: âidn:identity-attributes-changedâ,
âfilterâ: âchanges.attribute eq âcostCenterââ
}
},
âdefinitionâ: {
âstartâ: âCompare Cost Centerâ,
âstepsâ: {
âCompare Cost Centerâ: {
âtypeâ: âchoiceâ,
âchoiceListâ: [
{
âcomparatorâ: âStringDoesNotEqualsâ,
âvariableA.$â: â$.trigger.changes[?(@.attribute == âcostCenterâ)][0].newValueâ,
âvariableB.$â: â$.trigger.changes[?(@.attribute == âcostCenterâ)][0].oldValueâ,
ânextStepâ: âUpdate Modified Dateâ
}
],
âdefaultStepâ: âEnd Step - Successâ
},
âUpdate Modified Dateâ: {
âtypeâ: âactionâ,
âactionIdâ: âsp:httpâ,
âattributesâ: {
âauthenticationTypeâ: âOAuthâ,
âmethodâ: âPATCHâ,
âoAuthClientIdâ: â<YOUR_CLIENT_ID>â,
âoAuthClientSecretâ: â<YOUR_CLIENT_SECRET>â,
âoAuthTokenUrlâ: âhttps://xyz-sb.api.identitynow.com/oauth/tokenâ,
âoAuthCredentialLocationâ: âoAuthInHeaderâ,
ârequestContentTypeâ: âjsonâ,
âurlâ: âhttps://xyz-sb.api.identitynow.com/v3/identities/${identity.id}â,
âjsonRequestBodyâ: [
{
âopâ: âreplaceâ,
âpathâ: â/attributes/modifiedDateOfCostCenterâ,
âvalueâ: â${now}â
}
]
},
ânextStepâ: âEnd Step - Successâ
},
âEnd Step - Successâ: {
âtypeâ: âsuccessâ
}
}
}
}/>
looks good, but, is it working.
Where are you getting the identity.id?
ideally it should come from the workflow trigger context
you cannot natively store the change date using a standard transform alone.
And it seems workflow have some issues itself. you havenât compared the old value as well. Although Workflow is the good option but this could be achieved this by using a static transform that leverages the âoldValueâ variable available in the identity attribute.
When the costCenter changes, you need two identity attributes to trak the change:
- Cost Center: The standard attribute synced from your HR source.
2.Cost Center Change Date: A custom attribute that will store the timestamp.
And then you need to apply a transform to the âCost Center Change Dateâ attribute that compares the current âcostCenterâ with its previous value.
please let us know if this works for you. Thanks
what do u mean? can u please tell me in details
can u pls give me the trasnform if possible
I didnât see this in your WF: âidentity.id$â: â$.trigger.identity.idâ
How were you intending to populate this url?
âurlâ: âhttps://xyz-sb.api.identitynow.com/v3/identities/${identity.id}â,
without defining ${identity.id}
in trigger we need to define it ? right ?
Yes. Take a look at the templates that are on your tenant. That will show you what you need to grab and how to grab the idenity.id details
Where is the documentation for:
PATCH https://tenant-sb.api.identitynow.com/v3/identities/:id
It isnât listed in V3 APIs | SailPoint Developer Community or the other api versions. I tried sending a test to the endpoint in my tenant and came back with 404 : {âerrorâ:âNo message availableâ}
I donât think you can update an identity attribute through an API call unless itâs a delimited file source.
The suggestions on here arenât going to work unless the authoritative source is from a delimited file and youâre updating the account from that source, not the identity itself.
This is the closest I can find and it clearly states, it can only update flat file sources.
https://devrel.api.identitynow.com/v3/identities/${identity.id} is this valid??