--- title: "Criteria Scripts" slug: "configure-criteria-scripts-v6-5" description: "Create reusable Criteria Scripts to evaluate user policies and automate client updates in Appgate SDP, enhancing authentication and access control." updated: 2025-10-31T18:24:04Z published: 2025-10-31T18:24:04Z canonical: "support.appgate.com/configure-criteria-scripts-v6-5" --- > ## 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. # Criteria Scripts Criteria Scripts are designed to allow re-usable (advanced) expressions to be created that evaluate criteria (Claims) to true or false. Used to define scripted rules which assigns Policies to users and pushes Client auto-updates to devices. > [!NOTE] > **NOTE** > > Criteria Scripts cannot be used in Conditions. ## Before you start Requirements/Considerations: - The script runs on the Controller once for every user authenticated and Policy. So 1000 users authenticating with 100 Policies configured will result in the script running 100,000 times. - The script runs in a sandboxed JavaScript engine which supports external httpGet/Post/Put/Delete calls. Background reading: - See [Use of Scripts](/v1/docs/use-of-scripts). - Get a better understanding of [User claims](/v1/docs/user-claims). - Get a better understanding of [Device claims](/v1/docs/device-claims). - Get a better understanding of how [Policy assignment](/v1/docs/using-policies#policy-assignment) decisions are made. - Refer to [Claims in Detail](/v1/docs/claims-in-detail) for information about all the claims used in the system. ## Completing the Criteria Scripts form ***Name*** Should be a valid JavaScript name. So no white spaces, dashes or special characters. If you are editing an existing script, changing the name may break any existing configuration. ***Assignment*** Will trigger the appropriate action if true. For more information see [Configure Conditions](/v1/docs/configure-conditions) Criteria Scripts use the same script view and java-script editor tools that are available when you configure Policies directly. So you only need to create one here if you plan to re-use it more than once. ***Testing the Criteria Script*** There is an Action to allow you to Test the script. Key-value pairs related to the identity and content of the user or device and are specific to each session. The Controller is the central management appliance in the Appgate ZTNA system, responsible for user authentication, policy distribution, and overall system administration. A Policy is a set of rules that govern access control and permissions for users and devices within the Appgate ZTNA system. Policies determine what resources users can access based on their entitlements.