Skip to main content

Hooks and delayed operations

A hook is an extra step that runs before or after a provisioning operation. Hooks let one access decision do more than one thing:

  • archive a mailbox before an account is deleted
  • hold a new account until an external check finishes
  • disable an account today and delete it in 30 days

Hooks belong to a resource's provisioning profile. Each of the eight operations (Provision, Revoke, Enable, Disable, Update Attributes, Add Grants, Remove Grants and Set Grants) has its own hooks. Hooks run only on resources fulfilled by a connector integration. Owlie refuses to save hooks on a resource that a person, a group or a function fulfills.

Add a hook step​

  1. Open the resource, select the Provisioning tab and expand the operation.
  2. Under Hooks, select Add step in the Before or the After list.
  3. Choose a Step kind and fill in its fields.
  4. Reorder steps by dragging the handle or with the up and down arrows.
  5. Select Save at the top of the page.

A new step starts as a Wait of one day. Below the lists, Sequence shows the whole order on one line, for example wait 30d → archive-account → wait 60d → delete.

Before steps run before the operation changes the account. After steps run once the change has been applied.

Step kindFieldsWhat it does
Run connector opConnector operationRuns one of the connector's own operations, such as archive-account.
WaitDuration, UnitPauses for a fixed time.
Wait for callbackTimeout, Unit, On timeoutPauses until the wait is resumed or the timeout passes.
Follow-up operationFollow-up operation, Then delete the accountSubmits a second operation on the same account once the steps before it have finished.

Run a connector operation​

Connector operation takes the key of a custom operation that the connector declares. Owlie checks the key when you save and refuses one the connector doesn't have.

A connector operation is a side effect. It can't change the account's intended attributes, Grants or state. If the step fails, the operation fails and the account change it was guarding doesn't continue. After a connector operation runs, Owlie reads the account from the connected system again before its next change, because the operation may have altered it.

The same connector operation can appear only once among an operation's Before and After steps.

Wait for a fixed time​

Duration and Unit (minutes, hours or days) set the pause. The shortest wait is one minute and the longest is 366 days.

Where the wait sits changes what it does:

  • In Before, the wait holds the operation itself. The operation stays Fulfilling, the account is not changed yet, and whatever started the operation, such as a request, keeps waiting.
  • In After, the operation finishes first. It becomes Fulfilled, the request or policy that started it is told, and the remaining steps run later as a schedule on the account.

Wait for a callback​

Wait for callback pauses until someone or something resumes it. Use it when a step outside Owlie has to finish first, such as an identity check.

  • Timeout and Unit set how long Owlie waits, with the same limits as Wait.
  • On timeout decides what happens if nobody resumes it in time. Fail the sequence (default) stops the sequence there, and an operation that was waiting in Before fails. Continue anyway carries on with the next step.

An administrator with permission to modify provisioning can resume any wait by hand. Open the assigned resource from the identity's Resources tab. Under Schedule, select Resume now, enter an optional Reason, and confirm with Resume now. This skips the rest of the wait and records who resumed it on the operation. It works for a timed Wait too.

Submit a follow-up operation​

A Follow-up operation step submits a new operation on the same account: Revoke, Disable, Enable or Update attributes. For Revoke, select Then delete the account to delete the account whatever the profile's Account state says.

Owlie accepts this step only in a specific position, and shows a warning on the step otherwise:

  • It must be in After.
  • It must come after a Wait or Wait for callback step.
  • It must be the last step. Anything after it would never run.

The follow-up operation runs without the profile's hooks. A delayed revoke therefore doesn't start the Revoke hooks again, which would otherwise loop. If something has to happen alongside the delayed delete, such as archiving, put it in the same sequence before the follow-up operation.

Example: disable now, archive, then delete​

To disable a leaver's account at once, archive it after 30 days and delete it after 90:

  1. In Revoke, under Lifecycle, set Account state to Disabled.
  2. In the Revoke hooks' After list, add these steps in order:
    1. Wait, 30 days.
    2. Run connector op, with the connector's archive operation.
    3. Wait, 60 days.
    4. Follow-up operation, Revoke, with Then delete the account selected.
  3. Select Save.

Sequence reads wait 30d → archive-account → wait 60d → delete.

When someone's access is revoked, Owlie disables the account and the Revoke operation is fulfilled straight away, so the request, review or policy behind it is finished. The assigned resource reads Disabled, and its side panel shows the queued follow-up under Schedule with the time it resumes. On a resource that allows one account per person, the slot is freed only when the delete has run.

For the common case, disable now and delete after a number of days, you can set this from People lifecycle instead. On the Terminated page, choose Disable now, delete later for the resource. See People lifecycle.

What cancels or interrupts a sequence​

Steps that follow an After wait run only if the account still looks the way the sequence expected: the same intended state and the same status. Any newer operation on the account cancels the rest of the sequence, and the newer decision wins. If a leaver is rehired during the 30 days, the operation that re-enables the account cancels the archive and the delete, and the person gets the same account back.

If a connector operation in the scheduled part fails, Owlie retries it with a growing delay. When it gives up, the Schedule section shows "Follow-up failed" with the number of attempts. Fix the cause, then select Retry follow-up to run that step again.

A wait in Before is part of the operation, so it follows the operation's own retries. When you retry a failed operation, a Before wait it already completed isn't repeated unless you changed that wait, a step before it, or the number of waits in the list.

Limits​

  • Sequences are linear. There are no branches or loops.
  • An After list can hold one follow-up operation, as its last step.
  • A follow-up operation can't set a password.