> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/conditional-access-policies.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Conditional access policies

Build Devolutions Server conditional access workflows that decide sign-ins and PAM checkouts with ordered If, Else if and Else branches.

***Conditional access policies*** decide whether a user can sign in to Devolutions Server and which rules apply to a privileged access (PAM) checkout. Each decision is made by a workflow: an ordered list of ***If*** and ***Else if*** branches, followed by an ***Else***. The workflow reads the branches from top to bottom, and the first branch whose conditions match decides the outcome. When no branch matches, the ***Else*** decides.

{% hint style="info" %}
In a high-availability or load-balancing environment, changes to the conditional access policies may take up to 5 minutes to be fully applied.
{% endhint %}

To open the workflows, go to ***Administration – Server settings – Conditional access policies***. The page has two tabs:

* ***Login***: The workflows that decide sign-ins. A sign-in workflow decides whether the sign-in is allowed and which [login policy](https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/login-policies.md) applies. The login policy sets the MFA requirement.
* ***Checkout***: The workflows that decide PAM checkouts. A checkout workflow decides which [checkout policy](https://docs.devolutions.net/server/web-interface/administration/modules/privileged-access/checkout-policies.md) applies to the checkout request. This tab requires a PAM license, and managing checkout workflows requires the ***Edit*** permission on checkout policies.

Each tab lists the workflows with their ***Name***, ***Status*** (***Active*** or ***Inactive***), ***Version***, ***Last modified*** and ***Last modified by*** columns. The ***Checkout*** tab also shows the provider each workflow is ***For***.

### Active workflows

Only an active workflow decides. A workflow you create or duplicate is inactive until you activate it.

* ***Login***: One sign-in workflow is active at a time. Activating another one replaces it right away.
* ***Checkout***: A checkout workflow is created ***For*** one PAM provider or for ***All providers***. A checkout uses the active workflow of its credential's provider. When that provider has no active workflow, the active ***All providers*** workflow decides. Credentials that do not belong to a PAM provider keep their entry's checkout policy.

Use the ***More*** menu (three vertical dots) next to a workflow to ***Open***, ***Duplicate***, ***Activate***, ***Deactivate*** or ***Delete*** it. Only a provider's active checkout workflow can be deactivated. Its provider's checkouts then follow the ***All providers*** workflow. The active sign-in workflow and the active ***All providers*** checkout workflow cannot be deactivated or deleted: activate another workflow in their place.

### Create a workflow

1. In ***Administration – Server settings – Conditional access policies***, click ***New workflow*** (plus icon).
2. Enter a ***Name***.
3. Select the ***Type***: ***Login*** or ***Checkout***.
4. For a checkout workflow, select the provider the workflow is ***For***, or ***All providers***. This choice cannot be changed afterwards.
5. Under ***Start from***, select ***Copy of the active workflow*** to start from the workflow that currently decides, or ***Empty***.
6. Click ***Create***. The workflow opens in the editor.
7. Build the branches (see below), then click ***Save***.
8. Back in the list, open the ***More*** menu of the workflow and select ***Activate***.

{% hint style="warning" %}
Saving an active workflow applies the change right away. Devolutions Server refuses to save or activate a workflow that would prevent your own user from signing in.
{% endhint %}

### Build the workflow

The editor shows what the workflow decides at the top (***When*** ***A user signs in*** or ***A checkout is requested***), then its branches, then the ***Else***.

#### Branches

Click ***Add branch*** to add a branch. The first branch is the ***If***, and the following ones are ***Else if*** branches. For each branch, you can:

* Enter a ***Note*** to describe what the branch is for.
* Turn off ***Enabled*** to skip the branch without deleting it.
* Use ***Move up*** and ***Move down*** to change the order. The order matters, because the first matching branch decides.
* Set ***Match*** to ***All*** (every condition must match) or ***Any*** (one condition is enough).
* Check ***Not*** to apply the branch when its conditions do not match. A branch with ***Not*** needs at least one condition.
* Click ***Add condition*** to add a condition, then select its values. Each condition can be set to ***Is*** or ***Is not***.

A branch without conditions always matches.

#### Then and Else

Under ***Then***, choose what happens when the branch matches. The ***Else*** at the bottom uses the same outcomes and applies when no branch matches.

<table><thead><tr><th width="260">OUTCOME</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Deny the sign-in</strong></td><td>Sign-in workflows. The user cannot sign in.</td></tr><tr><td><strong>Allow with the default login policy</strong></td><td>Sign-in workflows. The user signs in with the default login policy.</td></tr><tr><td><strong>Allow with a login policy</strong></td><td>Sign-in workflows. The user signs in with the login policy you select, or with a <em><strong>Custom policy</strong></em> defined on this outcome.</td></tr><tr><td><strong>Deny the checkout</strong></td><td>Checkout workflows. The checkout request is refused.</td></tr><tr><td><strong>Apply a checkout policy</strong></td><td>Checkout workflows. The checkout uses the checkout policy you select, or a <em><strong>Custom policy</strong></em> defined on this outcome. It overrides the entry's own checkout policy.</td></tr><tr><td><strong>Use the entry's checkout policy</strong></td><td>Checkout workflows. The checkout uses the policy the entry already resolves to.</td></tr><tr><td><strong>Nested condition</strong></td><td>Branches only. Opens another <em><strong>If</strong></em>, <em><strong>Else if</strong></em> and <em><strong>Else</strong></em> block that is evaluated only when the branch matches. Nested conditions go up to four levels deep.</td></tr></tbody></table>

A ***Custom policy*** is defined on the outcome itself: click ***Edit*** next to it to set its settings. Use it for a one-off case instead of creating a named policy. A named policy is edited on its own page, in [Login policies](https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/login-policies.md) or [Checkout policies](https://docs.devolutions.net/server/web-interface/administration/modules/privileged-access/checkout-policies.md). A named policy that a workflow uses cannot be deleted until the workflow applies another policy.

#### Conditions

<table><thead><tr><th width="260">CONDITION</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Administrative role</strong></td><td>The user has one of the selected administrative roles.</td></tr><tr><td><strong>Authentication type</strong></td><td>The user signs in with one of the selected authentication types.</td></tr><tr><td><strong>Certificate</strong></td><td>Sign-in workflows only. The client certificate passes one of the certificate checks. A check validates the certificate against a <em><strong>Certificate authority</strong></em> and can filter on a certificate field (<em><strong>Filter field</strong></em>, <em><strong>Match type</strong></em> and <em><strong>Filter value</strong></em>).</td></tr><tr><td><strong>Geo IP</strong></td><td>The request comes from one of the selected countries. Requires the <a href="https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/geoip-security.md">Geo IP</a> settings.</td></tr><tr><td><strong>IP addresses</strong></td><td>The request comes from one of the IP addresses or ranges.</td></tr><tr><td><strong>Time</strong></td><td>The request is made during the selected days and hours.</td></tr><tr><td><strong>User groups</strong></td><td>The user is a member of one of the selected user groups.</td></tr><tr><td><strong>User tags</strong></td><td>The user has one of the selected user tags.</td></tr><tr><td><strong>Users</strong></td><td>The user is one of the selected users.</td></tr><tr><td><strong>Credential type</strong></td><td>Checkout workflows only. The checked out credential is of one of the selected types.</td></tr><tr><td><strong>Duration (in minutes)</strong></td><td>Checkout workflows only. Compares the requested checkout duration to a number of minutes.</td></tr><tr><td><strong>Elevation groups</strong></td><td>Checkout workflows for one provider only. The request asks for one of the provider's elevation groups.</td></tr><tr><td><strong>Reason</strong></td><td>Checkout workflows only. A reason is given, or not.</td></tr><tr><td><strong>Ticket</strong></td><td>Checkout workflows only. A ticket is given, or not.</td></tr><tr><td><strong>Granted to another user</strong></td><td>Checkout workflows only. The checkout is granted to another user, or not.</td></tr><tr><td><strong>Just-in-Time (JIT) Elevation</strong></td><td>Checkout workflows only. JIT elevation is requested, or not.</td></tr><tr><td><strong>Recipient</strong>, <strong>Recipient administrative role</strong>, <strong>Recipient user groups</strong>, <strong>Recipient user tags</strong></td><td>Checkout workflows only. The same checks as above, on the user who receives a checkout granted to another user.</td></tr></tbody></table>

### Test a workflow

The ***Test this workflow*** panel next to the editor runs a simulated sign-in or checkout request through the workflow as it is in the editor, before you save it.

1. Fill in the values the workflow's conditions read. Only the values the conditions use are shown.
2. Click ***Run***.
3. Read the ***Results***: the outcome, the policy that applies and, for a sign-in, the ***MFA requirement*** and ***Allowed MFA methods***. The deciding branch is highlighted in the editor, and each branch shows whether it was ***Matched***, ***Not matched*** or ***Skipped***.

{% hint style="info" %}
When a value a condition reads is missing at sign-in or checkout, the most restrictive outcome can apply. The simulator says so in its results.
{% endhint %}

### Upgrade from earlier versions

When Devolutions Server is upgraded from a version that used the former Login and MFA policy lists, those policies are converted once into one active sign-in workflow:

* Each policy becomes a branch, in the same order. Inactive policies become disabled branches.
* The MFA actions become custom login policies on the branches.
* The former default MFA action becomes the ***Default policy*** login policy, which the ***Allow with the default login policy*** outcome applies.

Checkout starts with an active ***All providers*** workflow that has no branch, so every checkout keeps the checkout policy of its entry until you change it.

#### See also

* [Login policies](https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/login-policies.md)
* [Multifactor](https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/multifactor.md)
* [Devolutions Academy – Enforce MFA for users from Devolutions Server web interface](https://academy.devolutions.net/student/page/2747690-enforce-mfa-for-users-from-devolutions-server-web-interface?curriculum_activity_id=4182448\&path_id=2628397\&sid=bb09373a-649a-4eec-b775-94cdc950983e\&sid_i=0)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/server/web-interface/administration/configuration/server-settings/security/conditional-access-policies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
