Tearleads

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

NameInTypeDetails
organizationIdpathstringrequired
  • lowercase UUID v4
userIdpathstringrequired
  • lowercase UUID v4

Request body

application/jsonUpdateOrganizationRosterTwoFactorRequest

An administrator's two-factor requirement for one member.

1 field
  • requiredbooleanrequired

    True 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
  • createdAtstringrequired
  • disabledAtstringrequirednullable
  • disabledByUserIdstringrequirednullable

    Administrator who disabled the entry, or null.

  • encapsulationKeyFingerprintstringrequired
  • isPersonalOrganizationOwnerbooleanrequired

    True for the user whose personal organization this is; they cannot be removed from it.

  • isSelfbooleanrequired

    True for the caller's own entry.

  • joinedAtstringrequired
  • leaveRequestOrganizationLeaveRequestrequirednullable

    The member's pending signed request to leave, shown only to administrators and the member.

  • profileDocumentIdstringrequirednullable

    Encrypted roster profile document, or null.

  • signingKeyFingerprintstringrequired
  • statusstringrequired
    • one of active, disabled

    active members have access; disabled entries stay visible without access.

  • twoFactorRequiredbooleanrequired
  • updatedAtstringrequired
  • userIdstringrequired

Other fields are allowed.

Other responses

StatusMeaningBody
400Bad Request

application/jsonErrorResponse

401Unauthorized

application/jsonSessionFailureResponse

403Forbidden

application/jsonErrorResponse

404Not Found

application/jsonErrorResponse

500Internal Server Error

application/jsonErrorResponse

503Service Unavailable

application/jsonErrorResponse