PUT/organizations/{organizationId}/roster/{userId}/two-factor
Require two-factor authentication of a member
Operation organizations.roster.twoFactor.update
Description
Sets whether a member must sign in with two-factor authentication before this organization's server routes answer them. Only organization administrators may call it, for a user on the roster. While it is set, a session of the member that did not pass a second factor is refused with 403 and code organization_two_factor_required. When the setting changes, the member's sessions that did not pass one are revoked so the next sign-in applies it.
Authentication
Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
organizationId | path | string | required
|
userId | path | string | required
|
Request body
application/jsonUpdateOrganizationRosterTwoFactorRequest
An administrator's two-factor requirement for one member.
1 field
requiredbooleanrequiredTrue to refuse the member's sessions that did not pass a second factor.
Responses
200 OK
application/jsonOrganizationDirectoryUserResponse
One organization roster entry with the fingerprints of the user's registered keys. Display names live in the encrypted profile document.
14 fields
createdAtstringrequireddisabledAtstringrequirednullabledisabledByUserIdstringrequirednullableAdministrator who disabled the entry, or null.
encapsulationKeyFingerprintstringrequiredisPersonalOrganizationOwnerbooleanrequiredTrue for the user whose personal organization this is; they cannot be removed from it.
isSelfbooleanrequiredTrue for the caller's own entry.
joinedAtstringrequiredThe member's pending signed request to leave, shown only to administrators and the member.
profileDocumentIdstringrequirednullableEncrypted roster profile document, or null.
signingKeyFingerprintstringrequiredstatusstringrequired- one of
active,disabled
activemembers have access;disabledentries stay visible without access.- one of
twoFactorRequiredbooleanrequiredupdatedAtstringrequireduserIdstringrequired
Other fields are allowed.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|