Disable userAccountControl when user is deleted from source
I was having a silly issue with this, but thought I'd put it in here.
I have a custom MVExtension that is determining a csentry should be deprovisioned based on a custom attribute that is set by the source MA to a constant value. If that value goes away, the deprovisioning logic kicks in.
The simple way to get the Deprovision logic to kick in at that point is to have the Dperovision() action called on the csentry:
CSEntry csentry = ManagementAgent.Connectors.ByIndex[0];
csentry.Deprovision();
Then, in the RulesEx for that management agent, in the Deprovision section, I set the csentry["userAccountControl"].Value to disabled and called:
DeprovisionAction Deprovision = DeprovisionAction.Disconnect;
return Deprovision;
The "trick" I was missing was that I had to change the Deprovision option on the management agent to "Determine with a rules extension". Easy to overlook when there wasn't enough coffee to go round in the morning. ;-)



