--- title: "Conditions" slug: "conditions-v7-0" description: "Learn about condition-based access, user interactions, and access criteria expressions to enhance security and control access effectively." tags: ["Access Management", "Conditions", "Condition Based Access"] updated: 2026-09-21T12:57:26Z published: 2026-09-21T12:57:32Z canonical: "support.appgate.com/conditions-v7-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.appgate.com/llms.txt > Use this file to discover all available pages before exploring further. # Conditions Condition-based access is used to set up access controls. Conditions use claims-based access criteria expressions that must evaluate to *true* for the entitlement’s actions to be allowed (for example, access is allowed only when the user is on an office IP address). If the criteria evaluate to *false*, the entitlement block rule applies. If a [user interaction](/v1/docs/user-interactions-v7-0) is configured in a condition, it triggers when the access criteria evaluate to *false*. User interactions let users unblock access by updating or supplying claims that meet the criteria—for example, completing multifactor authentication when not on an office IP address. --- ## Condition-based access Conditions use access criteria expressions made up of claims-based evaluations, for example, *Day of week is Tuesday*. Criteria expressions have three different combining modes (without using scripts): - ****: A logical `AND`. All criteria must be true. - ****: A logical `OR`. At least one criterion must be true. - ****: A Boolean expression that references multiple criteria. ![Custom logic expression using AND and OR operators for filtering data.](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/ag65-custom_logic.png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A54Z&se=2026-11-21T22%3A39%3A54Z&sr=b&sp=r&sig=k3kZ6AgtZw7Sjm%2BmgP2hdHK6IerG9bl%2BEL6VDBpNwaU%3D) ### Access criteria scripts Gateways evaluate access criteria expressions in [conditions](/v1/docs/configure-conditions-v7-0#access-criteria1) to make access decisions. If the result is true, the actions are allowed; if false, a user interaction may be initiated and sent to the client. Scripts are not required—expressions can be configured directly in the condition using the criteria tool and claims drop-down list, which generates the JavaScript expression automatically. However, an access criteria script can combine user, device, and system claims with dynamic data to make complex access decisions in near real-time. Scripts execute in a sandboxed JavaScript engine that supports httpGet/Post/Put/Delete calls. Scripts run on every new TCP stream, so keep them efficient. For static claims such as user group, use a [user claim script](/v1/docs/user-claims-v7-0) instead—it runs once per sign-in and the Controller adds the resulting claims to the claims token, reducing unnecessary external API calls from the Gateways. For more information, see [Criteria Scripts](/v1/docs/criteria-scripts-v7-0). --- ## Examples of how to combine access criteria to control access #### Example 1. Restrict access to only devices connected to the office network during working hours All criteria in one condition, with that condition added to the entitlement. | | Expression | Parameters | | --- | --- | --- | | **Condition "Office hours restricted access"** | Allowed when **** | | | - Access criteria | - Type: *Time is between* - Type: *System clientSrcIP in network* | - 09:00AM - 05:00PM - 10.0.0.0/24 | | **Entitlement "Working from office"** | If **** | | | - Condition | Office hours restricted access | | | ![Access criteria for restricted office hours based on time and IP address.](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/condition_example_1.png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A54Z&se=2026-11-21T22%3A39%3A54Z&sr=b&sp=r&sig=Fz3uFdlwER8pBYbSA7DsX2cJFtDUIUYjkm07y1ttQss%3D) | ![Form for adding entitlement with fields for name, status, and access rights.](https://cdn.us.document360.io/e7482ce5-acfa-4c3b-b76c-b6c32472644a/Images/Documentation/condition_ent_ex_1.png?sv=2026-02-06&spr=https&st=2026-11-21T21%3A39%3A54Z&se=2026-11-21T22%3A39%3A54Z&sr=b&sp=r&sig=0HmXBnW%2FNwUQ15Qgar2EWjB1kAim%2FnuyF6mTXFectHw%3D) | | --- | --- | #### Example 2. Restrict access to only devices connected to the office network during working hours Two individual conditions which are then combined together using ***all criteria below must be true*** within the appropriate entitlement. | | Expression | Parameters | | --- | --- | --- | | **Condition "Office Hours"** | Allowed when **** | | | - Access criteria | Type: *Time is between* | 09:00AM - 05:00PM | | **Condition "Office network"** | Allowed when **** | | | - Access criteria | Type: *System clientSrcIP in network* | 10.0.0.0/24 | | **Entitlement "Working from office"** | Allowed when **** | | | - Condition | Office hours Office network | Within office hours AND connected to the office network. | #### Example 3. Adding a user interaction to grant access outside office hours Two individual conditions, one containing a user interaction, that are combined using ***all criteria below must be true*** within the appropriate entitlement. | | Expression | Parameters | | --- | --- | --- | | **Condition "Office hours restricted access"** | Allowed when **** | | | - Access criteria | - Type: *Time is between* - Type: *System clientSrcIP in network* | - 09:00AM - 05:00PM - 10.0.0.0/24 | | **Condition "Evening access MFA"** | Allowed when **** | | | - Access criteria | - Type: *Time is between* - Type: *Provided MFA* | - 05:00pm - 09:00AM - (named) general (less than) 60 (minutes ago) | | - User Interaction | Type of interaction: *Require MFA* | (named) general (with text) "Enter a valid MFA" | | **Entitlement "Restricted finance access"** | Allowed when **** | | | - Condition | - Office hours restricted access - Evening access MFA | Within office hours AND connected to the office network. Outside office hours AND a valid MFA has been entered in the last 60 minutes. |