--- title: "Configuring conditions" slug: "configure-conditions-v7-0" description: "Learn how to configure access conditions and user actions for network resources, including MFA and custom claims, to enhance security and control." tags: ["Conditions", "Condition Configuration", "Access Criteria"] updated: 2026-10-05T18:56:49Z published: 2026-10-05T18:56:49Z canonical: "support.appgate.com/configure-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. # Configuring conditions Conditions define the criteria and user actions that control when network resources in entitlements can be accessed. --- ## Prerequisites Preconfigure the following elements: - ***MFA Provider***. For multifactor user interactions, see [Configuring MFA providers](/v1/docs/configuring-mfa-provider-v7-0). - ***Identity Provider***. For password user interactions, see [Configuring identity providers](/v1/docs/configuring-identity-providers-v7-0). - ***Customized claims***. To use customized claims, see [User claim scripts](/v1/docs/user-claim-scripts-v7-0) and [Device claim scripts](/v1/docs/device-claim-scripts-v7-0). --- ## Add a condition To create a condition: 1. Go to the **Conditions** page (Access > Conditions). 2. Select **+Add** and complete the following fields: - ***Name***. Enter a name for the condition. - ***Notes***. Optional. Enter notes for the condition. - ***Tags***. Click **+Add** to add tags to the condition. 3. Continue to complete the fields in the following sections: ### Access criteria - ***Setting Modes.*** List mode provides three options to define the criteria that must be true for access in an entitlement to be allowed. When you select a claim, the relevant parameters appear automatically. - *Switch to Script Mode.* Use the script editor to edit existing expressions or create your own. The JavaScript engine runs in a sandbox that prevents file system access. However, you can make external calls by using: > [!NOTE] > **NOTE** > > Script mode is intended for advanced use cases, and it can break compatibility with the other three modes. - HTTP PUT - HTTP POST - HTTP GET - HTTP DELETE For example, you can pass a value to an external system for validation as part of the expression. For more information about scripting, see [Claims and scripts](/v1/docs/claims-and-scripts-v7-0). - ***Criteria Combining Mode.*** Without scripts, criteria expressions support three combining modes: - **. A logical AND; all criteria must evaluate to true. - **. A logical OR; at least one criterion must evaluate to true. - *.* A Boolean expression of multiple criteria must evaluate to true. - ***Criteria.*** If you select criteria that include dynamic claims (claims that can change during a session), you can create access criteria expressions that enable AppGate ZTNA to respond to changes in a timely manner. For example, you can use the *clientSrcIP* claim to remove access to protected resources when the user leaves the office to work from home. Conditions can include multiple criteria, so decide how to combine them. Script mode is also available for advanced use cases. - *Type - User Actions****.*** In the *Type* list, **User Actions** includes three user response claims: *Provided MFA*, *Provided Reason*, and *Password*. Unlike other claims (which are hard-coded or preconfigured, for example, in the identity provider), user interaction names are defined in the condition. When you configure a claim suffix (name) and time period (if required), the system automatically creates a new user response claim that uses that name. | Type | Claim Suffix (Name) | Minutes (Time window) | Internal Claim Name | Criteria Check Method Used | | --- | --- | --- | --- | --- | | | The claim name that refers to this occurrence of the user interaction | Time window during which the claim evaluates to true | The internal user response claim generated from the given claim suffix (name) | Matching criteria check method used to evaluate if the claim is true or false | | Provided MFA | Example: general | Example: 60 | `user.otp.general` | `claims.user.hasOtp("general", 60)` | | Retyped Password | Example: finance | Example: 60 | `user.password.finance` | `claims.user.hasPassword("finance", 60)` | | Provided Reason | Example: github | n/a | `device.reason.github` | `claims.device.hasReason("github")` | [User interactions](/v1/docs/user-interactions-v7-0) provides additional details and examples about the built-in check methods used and how they tie to claim naming. - *Other claim types****.*** As you build an expression, you are prompted for the required parameters for the selected claim. | Claim type | Example | | --- | --- | | User Claim | **"groups match"**: use this option to check for membership of an LDAP group. The match operator uses exact match. If you test the LDAP "groups" claim with the contains operator, you must provide the full FQDN of the group name. For example: `CN=group3,OU=sweden,DC=cryptzone,DC=com", "CN=group4,OU=sweden,DC=cryptzone,DC=com` For security reasons, we do not recommend using partial matches. However, you can do partial matching in the JavaScript editor. You can flatten "groups" claim to a single string `var all_groups = claims.users.groups.toString()` and then check the group name: `var match= all_group.indexOf('CN=Developers,') > -1;` Note the trailing comma in the example. Include the trailing comma for security reasons to prevent unintentional matches, such as `CN=Developers Inactive, OU= vs CN=Developers, OU=..` | | Device Claim | "**os.family**": Use this option to include devices with a specific operating system, such as Windows. "**isFirewallEnabled**": Use this option to check whether a device firewall is enabled. > [!NOTE] > NOTE > > Any device claims or on-demand claims that return yes/no, true/false, and similar values are evaluated as strings. If a value must not be treated as a string, handle it by using