# Deactivation Rules

**Okta Orchestrator** can automatically check, warn, and deactivate user access to Okta based on criteria you determine.

{% hint style="info" %}
Automated deactivation is an important method to ensure that costly Okta licenses are recaptured and that temporary access is not allowed to linger indefinitely.
{% endhint %}

{% hint style="warning" %}
Deactivation Rules affect users at the Okta-level, and do not process against specific Access Entities. If deactivation occurs, the user will lose access to Okta entirely.
{% endhint %}

<figure><img src="/files/Rhk8cIiEB9d6OgjzI2sY" alt=""><figcaption><p>Deactivation Rule</p></figcaption></figure>

* **Type**: Type of check to apply before applying Deactivation Rule to users
  * **Simple**: Run a simple filter condition against all users, and apply 'Warning' or 'Deactivation' events against those that match.
  * **Scripted**: For each user, apply scripts and return true/false if the 'Warning' or 'Deactivation' event should be processed
* **Send warning email**: If the 'Warning' Condition/Script evaluates true, trigger an event (that will generally be used to send a notification)
  * **Event**: The event that is triggered when 'Send warning email' is enabled. Generally, this event will be used to trigger an email to the user that they must perform an action (such as logging in) in order to avoid deactivation.

{% hint style="info" %}
[**Deactivation Logs**](/okta-orchestrator/technical-docs/deactivation-rules/deactivation-logs.md) maintain an audit trail of any deactivations that occur due to Deactivation Rules.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yansalabs.com/okta-orchestrator/technical-docs/deactivation-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
