Docs
Live demo
PUT/api/v2/identities/{id}/mfa/requirement

Some changes in this call need a fresh second factor. A token cannot give a second factor, so such a change gets 403 auth.api_token_not_allowed. Make it in the console.

Mark or unmark a person of the caller organization as required to use a second factor. The mark counts while the organization requires a second factor from selected people and administrators (mfa_required_for_selected). A marked person without a second factor sets one up at the next sign-in. Open sessions stay. A change needs a recently confirmed second factor of an administrator who has one (POST /auth/mfa/reauth). Saving the current value changes nothing and needs none. An API token makes this change only when it was issued with allow_security_changes.

Parameters

Path1 required of 1
idstring · uuidpathrequired

Identity ID.

Request body application/json · IdentityMFARequirementRequest

Required1 of 1 fields
requiredbooleanrequired

True marks the person, false removes the mark.

Responses

200

OK

IdentityMFARequirementResponse · 5 fields
availablebooleanrequired

False when the installation does not offer a second factor. Then nobody is asked for one.

enrolledbooleanrequired

The person has an active second factor.

markedbooleanrequired

An administrator marked the person.

organization_requirementstringrequired

What the organization of the person requires: off, selected (marked people and administrators) or everyone.

offselectedeveryone
required_bystringrequired

Why a second factor is required: organization (from everyone), administrator (the person holds the admin role while the organization requires selected people and administrators), selected (the person is marked). Null when it is not required.

organizationadministratorselected
can be null
400

Bad Request: the identity is a group, or the body is invalid.

403

Forbidden: the caller's roles do not grant the permission of the operation, the person holds permissions the caller does not, the administrator has a second factor that was not confirmed recently (details.reason=mfa_reauth_required), or the request uses an API token issued without allow_security_changes (details.reason=api_token_security_changes_not_allowed).

Common errors: 401 404 409 413 429 500 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close