> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/identities/mfa.md).

# Multi-factor authentication

Require a second authentication factor for console access — globally, or per user — how a user enrols an authenticator app, and how to reset a factor someone has lost.

## What this is and when to use it

Multi-factor authentication adds a factor on top of the username and password so that a stolen or guessed password is not, by itself, enough to sign in. It sits on top of whichever authentication method the user arrives by — local password, a directory, or a federated provider — rather than replacing any of them.

Turn it on for everyone. In a privileged access solution, an operator's console account is the key to every managed credential in the environment, and the password to it is the weakest thing protecting them.

{% hint style="danger" %}
Enable MFA for all users. Everything else on this page is detail; this is the setting that matters.
{% endhint %}

Some operations in the console require MFA on the operator's *own* account and are simply unavailable without it — revealing a stored secret, and exporting accounts. See [Account templates](https://wiki.datadike.com/pam/administration/accounts/account-templates.md) and [Vault](https://wiki.datadike.com/pam/administration/accounts/vault.md).

## Available factors

| Factor                                 | What it is                                                                                                                                                                     |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **OTP / TOTP**                         | A rotating code on the OATH-TOTP standard, compatible with any authenticator app — Google Authenticator, Microsoft Authenticator, FreeOTP, Authy                               |
| **SMS**                                | A verification code by text message. Requires a configured SMS provider                                                                                                        |
| **Email**                              | A verification code by email                                                                                                                                                   |
| **Radius**                             | A token or one-time password validated by a Radius server — RSA SecurID, Duo Security, Microsoft NPS                                                                           |
| **Passkey / FIDO2**                    | A phishing-resistant key: a hardware security key such as a YubiKey, or device biometrics. Must be enabled in **System Settings › Authentication**                             |
| **Digital certificate / smartcard**    | A client certificate on a smartcard or cryptographic token, or the equivalent delegated to a federated provider                                                                |
| **Delegated to the identity provider** | When the solution is federated over SAML2 or OIDC, the second factor and conditional-access policies configured in Entra ID/ADFS, Okta, or Keycloak are honoured at this login |

{% hint style="info" %}
OTP/TOTP is the right default for most deployments. It works offline, it does not depend on message delivery, and it needs no hardware beyond a phone.
{% endhint %}

## Before you start

* The **SYSADMIN** profile for the global setting.
* An accurate clock on the server. TOTP is second-precision, and clock drift breaks every code at once — see [Common errors](#common-errors).
* A configured provider first, if you intend to use SMS or email as a factor.
* Passkey enabled in **System Settings › Authentication**, if you intend to use it.

## Steps

### Require it globally

1. Open **System Settings › Security › Authentication › Global MFA**.
2. Choose the scope:

   | Option              | Effect                                             |
   | ------------------- | -------------------------------------------------- |
   | Disabled            | Users authenticate with username and password only |
   | All users           | MFA is required for every user                     |
   | Administrators only | MFA is required only for administrative users      |
3. Save.

{% hint style="warning" %}
Once **All users** is set, individual users can no longer turn MFA off for themselves. That is the intent — but it also means the setting is the only place the requirement can be relaxed, so plan for enrolment before you flip it.
{% endhint %}

### Require it for one user

The user record carries its own MFA setting, in **Users › Users**. Use it for the exceptions: a specific administrator or a contractor who needs the factor while the global setting is still `Disabled` or `Administrators only`.

### How a user enrols

The user does this themselves; an administrator cannot enrol on their behalf.

1. In **Personal Settings**, the user starts OTP registration.
2. The console shows a QR code carrying the TOTP secret.
3. The user scans it with their authenticator app.
4. From then on, the app generates the six-digit code the login asks for.

### Reset a lost factor

If someone loses their phone or security key, an administrator clears the enrolment so they can register again.

1. Open **Users › Users** and click the username to open the user's detail page.
2. In the quick-update panel at the top right, click **Reset MFA**.

The user is prompted to enrol again at their next sign-in.

{% hint style="warning" %}
**You cannot reset your own MFA this way.** Signed in as an administrator, the Reset MFA action on your own record does not apply — so if the account with the highest privilege loses its factor, there is no self-service route back. Make sure at least one other account holds enough privilege to reset yours.
{% endhint %}

## What you should see

After enabling **Global MFA**, the login screen asks for the code as a second step, after the password has been accepted. Users who have not enrolled are taken through enrolment.

## How to verify it worked

1. In a private browser window, sign in as an affected user. The password alone must not get you in; you should be asked for a code, or taken through enrolment.
2. Open that user's record in **Users › Users** and confirm **MFA** is on and **MFA virtual bound** shows a linked authenticator.
3. As that user, try to switch MFA off in **Personal Settings**. Under **All users** the option must not be available. If it is, the global setting did not take.
4. Check that the login, and any failed second-factor attempt, is recorded in the audit trail. See [Audit trail](https://wiki.datadike.com/pam/administration/audit/audit-trail.md).
5. As an operator with MFA now enabled, reveal an account secret. It should work where it previously did not.

## Common errors

| Symptom                                                          | Cause                                                                                   | Fix                                                                                                                     |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `OTP code invalid, or server time error`, for every user at once | The server clock has drifted. TOTP is second-precision                                  | Correct the time on the server and keep it synchronised; a working NTP source is a prerequisite, not an optimisation    |
| One user's codes are always rejected                             | The clock on that user's device has drifted, or they are reading a stale enrolment      | Correct the device clock, or reset MFA and re-enrol                                                                     |
| A user lost their phone and cannot sign in                       | The factor is bound to the lost device                                                  | An administrator resets MFA on the user's record; the user re-enrols at next login                                      |
| An administrator cannot reset their own MFA                      | By design — the action does not apply to your own account                               | Have another privileged account perform the reset                                                                       |
| A stored secret cannot be revealed, or **Export** is greyed out  | MFA is not enabled on the *operator's* account                                          | Enable MFA on your own account, then retry. See [Vault](https://wiki.datadike.com/pam/administration/accounts/vault.md) |
| A user can still turn MFA off                                    | **Global MFA** is `Disabled` or `Administrators only` and they are not an administrator | Set it to **All users**                                                                                                 |
| SMS or email codes never arrive                                  | No provider is configured for that channel                                              | Configure the provider, or use OTP/TOTP, which needs no delivery channel                                                |

## Field reference

### Global MFA

| Value               | Effect                                                 |
| ------------------- | ------------------------------------------------------ |
| Disabled            | Username and password only                             |
| All users           | Required for everyone; individual users cannot opt out |
| Administrators only | Required for administrative users                      |

### On the user record

| Field             | What it means                                                                                                         |
| ----------------- | --------------------------------------------------------------------------------------------------------------------- |
| MFA               | Whether a second factor is required for this user                                                                     |
| MFA virtual bound | Whether an authenticator app or device is actually linked. Required *and* unbound means the user has not enrolled yet |

In the bulk user-import template, **MFA** is written in `name(value)` form — for example `Disabled(0)` or `Enabled(1)`. The template accepts the values `0`, `1`, and `2`.

### Adjacent settings on the same screen

**System Settings › Security › Authentication** also carries login controls that are not MFA but are often configured in the same pass:

| Setting                       | What it does                                                                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Login captcha                 | Requires a captcha at login, to block automated sign-in attempts                                                                           |
| Login dynamic code            | Sends the password and an additional code to a third-party authentication system for verification                                          |
| Auto disable threshold (day)  | Detects accounts that have not been used within the given number of days and disables them                                                 |
| Suspicious login verification | Checks whether the login IP belongs to a city the account usually signs in from, and sends the user a remote-login notice when it does not |

Detection of genuinely anomalous access — unusual hours, a new location, improbable travel — and the automatic response to it belong to the behavioural analytics module rather than to these checks. See [UEBA policy](https://wiki.datadike.com/pam/administration/ueba/policy.md).

## Related pages

* [Users and groups](https://wiki.datadike.com/pam/administration/identities/users-and-groups.md) — where the per-user MFA setting lives
* [Single sign-on](https://wiki.datadike.com/pam/administration/identities/sso.md) — delegating the second factor to a corporate provider
* [Login policies](https://wiki.datadike.com/pam/administration/access/login-policies.md) — when and from where sign-in is allowed at all
* [Vault](https://wiki.datadike.com/pam/administration/accounts/vault.md) — secret reveal, which requires MFA
* [Account templates](https://wiki.datadike.com/pam/administration/accounts/account-templates.md) — account export, which requires MFA
