# ConnectorAfterModify - cloudPreviousValues

**URL:** <https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177>\
**Category:** SHF Discussion and Questions\
**Tags:** rules, sailpoint-identity-security\
**Created:** [June 24, 2024, 11:41am UTC](https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177 "2024-06-24T11:41:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [June 24, 2024, 11:41am UTC](https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177/1 "2024-06-24T11:41:12Z")

</div>

Hiya,

I’m trying to import the previous value of the AD attribute into the PS script so that I can use it to remove membership from group entitlements.  
Does anyone have a working example of how to do this? I’m assuming that I will probably have to add something to the OOB rule.

Thanks in advance  
Phil

---

<div class="post-metadata">

**Author:** ![amansingh](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@amansingh](https://developer.sailpoint.com/discuss/u/amansingh)\
**Post date:** [June 24, 2024, 12:14pm UTC](https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177/2 "2024-06-24T12:14:18Z")

</div>

Hi Phil,  
Good day!

There is Before Provisioning Rule which will add this previous value to the AccountRequest argument and you will be picking out that argument in the connector rule to cater to your use-case.

As for the rule the BeforeProvisioningRule will be almost same like in IdentityIQ the only caviat is to leverage ISC specific classes.

Thanks,  
Aman

---

<div class="post-metadata">

**Author:** ![jesvin90](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jesvin90/32/5301_2.png) [@jesvin90](https://developer.sailpoint.com/discuss/u/jesvin90)\
**Post date:** [June 24, 2024, 12:51pm UTC](https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177/3 "2024-06-24T12:51:57Z")

</div>

Hi @PhilRawlings1,

Here is an example for getting the old value of extensionAttribute4 in the After Modify PowerShell script. Note that you will get this value only if extensionAttribute4 is changing as part of the event.

```auto
$attributesMap = $requestObject.Attributes

$oldext4=$attributesMap.cloudPreviousValues.extensionAttribute4

```

OR

`$oldext4=$attributesMap['cloudPreviousValues']['extensionAttribute4']`

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [June 24, 2024, 1:14pm UTC](https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177/4 "2024-06-24T13:14:51Z")

</div>

@jesvin90  
That has worked perfectly - thank you very much.  
And hopefully, that will be my last question regarding connector rules for a while.

Phil

---

<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:** [August 23, 2024, 1:14pm UTC](https://developer.sailpoint.com/discuss/t/connectoraftermodify-cloudpreviousvalues/68177/5 "2024-08-23T13:14:58Z")

</div>

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