# afterModify connector rule; Operation : Enable

**URL:** <https://developer.sailpoint.com/discuss/t/aftermodify-connector-rule-operation-enable/79173>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, rules, sailpoint-identity-security\
**Created:** [September 3, 2024, 3:44pm UTC](https://developer.sailpoint.com/discuss/t/aftermodify-connector-rule-operation-enable/79173 "2024-09-03T15:44:39Z")\
**Posts on this page:** 3\
**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:** [September 3, 2024, 3:44pm UTC](https://developer.sailpoint.com/discuss/t/aftermodify-connector-rule-operation-enable/79173/1 "2024-09-03T15:44:39Z")

</div>

Hi,

Has anyone managed to grab the operation variable from the afterModify rule?

```auto
Instance : 
ApplicationName : Active Directory - QA [source]
Operation : Enable <= This value here
ObjectType : 
ProvisioningResult : 

```

I would like to be able to run PS scripts _only_ when the account is being enabled, and no other attributes are being updated.

Thanks

---

<div class="post-metadata">

**Author:** ![gourab](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gourab/32/18650_2.png) [@gourab](https://developer.sailpoint.com/discuss/u/gourab)\
**Post date:** [September 3, 2024, 5:53pm UTC](https://developer.sailpoint.com/discuss/t/aftermodify-connector-rule-operation-enable/79173/2 "2024-09-03T17:53:00Z")

</div>

Hi @PhilRawlings1 ,  
I wrote a aftermodify rule to sent custom emails once AD is disabled , there I have used

```auto
    $requestObject = New-Object Sailpoint.Utils.objects.AccountRequest($xmlReader);
	
	$RequestOperation=$requestObject.Operation
	
    if ($RequestOperation -eq "Disable"){
}

```

to detect disable operation .In the Same way I believe “Enable” operation can be checked

---

<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 2, 2024, 5:53pm UTC](https://developer.sailpoint.com/discuss/t/aftermodify-connector-rule-operation-enable/79173/3 "2024-11-02T17:53:38Z")

</div>

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