Docs
Live demo
PUT/api/v2/organizations/{id}/policy
security:manageConsole session only

Replace the organization's security policy. Omitted or null overrides inherit the installation value. Every override must be stricter than the installation. The forgot-password form and password sign-in can only be turned off. An administrator with an enrolled second factor must have confirmed it within the re-authentication window (POST /auth/mfa/reauth). The request names the policy revision it was read at. When the policy was saved since (another administrator, another tab, or a change of mfa_required through PUT /organizations/{id}), the save is refused with 409 and details.error_code version_mismatch. An API token makes this change only when it was issued with allow_security_changes.

  • Replaces the whole policy (revision and mfa_required required). Omitted or null fields inherit installation defaults (omitted credentials_show_once keeps its value).
  • 409 (version_mismatch) on stale revision, 400 if weaker than installation.
  • Needs MFA step-up, or a token with allow_security_changes (403 auth.api_token_not_allowed).

Parameters

Path1 required of 1
idstringpathrequired

Organization ID (UUID)

Request body application/json · OrganizationPolicyRequest

Organization security policy

Required2 of 15 fields
revisioninteger · int64required

Policy revision the values were read at (dto.OrganizationPolicyResponse.revision).

min 1
mfa_requiredbooleanrequired

Require a second factor from every member before a console session is issued.

Optional13 fields
forgot_password_enabledboolean

Only false is accepted. Turns off the forgot-password form for Principal users.

can be null
mfa_reauth_window_secondsinteger

How long a confirmed second factor covers sensitive changes. At most the installation value.

min 60 · max 86400 · can be null
mfa_required_for_selectedboolean

Require a second factor only from the people marked on PUT /identities/{id}/mfa/requirement and from every member who holds the admin role. Has no extra effect while mfa_required is true. Omitted keeps the stored value, so a client that does not know the field can't turn the mode off.

password_max_age_daysinteger

Days after which a Principal password expires and must be reset.

min 1 · max 3650 · can be null
password_min_lengthinteger

Minimum Principal password length. At least the installation minimum.

min 12 · max 64 · can be null
password_sign_in_enabledboolean

Only false is accepted. Principal users then sign in to applications through SSO only.

can be null
session_idle_timeout_secondsinteger

Console idle timeout. At most the installation value.

min 300 · max 2592000 · can be null
session_max_lifetime_secondsinteger

Absolute console session length. At most the installation value.

min 900 · max 2592000 · can be null
credentials_read_limit_per_hourinteger

How many times one caller may view credentials per hour in this organization, counted over a sliding hour across every identity. Null inherits the installation default of 20. The next view answers 429 (details.reason=credential_read_limit_exceeded, details.retry_at).

min 1 · max 1000 · can be null
credentials_show_onceboolean

Show a stored secret once after it is issued. Afterwards GET /identities/{id}/credentials lists the account with reveal_available=false and an unavailable_reason, and only a rotation gives a new secret. Omitted keeps the stored value.

members_link_sign_in_methodsboolean

Members add sign-in methods to themselves in Account security. Off at first. Omitted keeps the stored value.

suspend_people_connector_losesboolean

A connector suspends a person it no longer finds when no other source is left to them. On at first. Omitted keeps the stored value.

API token settings. Omitted keeps the stored settings, so a client that does not know the field can't change them. Null numbers inside reset a setting to the installation default.

6 fields
default_lifetime_daysinteger

Lifetime the console offers for a new token.

min 1 · max 366 · can be null
max_lifetime_daysinteger

Longest lifetime of a new token or a replaced secret. 366 days is the ceiling of the installation.

min 1 · max 366 · can be null
security_max_lifetime_daysinteger

Longest lifetime of a token issued with allow_security_changes.

min 1 · max 366 · can be null
networks_requiredboolean

Require the networks a new token is accepted from. Omitted means false.

unused_disable_daysinteger

Days without use after which the periodic check disables a token. 0 turns the check off.

min 0 · max 3650 · can be null
cap_existingboolean

Apply the longest lifetime to tokens issued before it was set: such a token stops working when its lifetime reaches the limit, at once when it already has. GET /api-tokens/policy/preview lists them. Omitted means false. Turning it off makes the tokens work again until their own expiry.

Responses

200

OK

OrganizationPolicyResponse · 19 fields
forgot_password_enabledbooleanrequired

False when the organization turned the form off. Null inherits the installation.

can be null
installationOrganizationPolicyInstallationrequired

Installation values an organization inherits and may only tighten.

8 fields
forgot_password_enabledbooleanrequired

True when the installation offers the forgot-password form to Principal users.

mfa_enabledbooleanrequired

True when the installation offers second factors.

mfa_reauth_window_secondsintegerrequired
password_min_lengthintegerrequired
session_idle_timeout_secondsintegerrequired
session_max_lifetime_secondsintegerrequired
credentials_read_limit_per_hourintegerrequired

Hourly reveal limit per caller that an organization without an override uses.

api_tokensAPITokenPolicyResponserequired

Installation defaults of the API token settings.

6 fields
default_lifetime_daysintegerrequired

Lifetime the console offers for a new token.

max_lifetime_daysintegerrequired

Longest lifetime of a new token or a replaced secret.

security_max_lifetime_daysintegerrequired

Longest lifetime of a token issued with allow_security_changes. Never more than max_lifetime_days.

networks_requiredbooleanrequired

A new token must name the networks it is accepted from.

unused_disable_daysintegerrequired

Days without use after which the periodic check disables a token. 0 turns the check off.

cap_existingbooleanrequired

The longest lifetime also applies to tokens issued before it was set.

Range every numeric setting accepts under this installation, in the setting's unit: characters, days or seconds. A save rejects a changed value outside its range.

8 fields
mfa_reauth_window_secondsOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
password_max_age_daysOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
password_min_lengthOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
session_idle_timeout_secondsOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
session_max_lifetime_secondsOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
credentials_read_limit_per_hourOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
api_token_lifetime_daysOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
api_token_unused_disable_daysOrganizationPolicyRangerequired

Inclusive range of a numeric setting.

2 fields
maxintegerrequired
minintegerrequired
mfa_reauth_window_secondsintegerrequired
can be null
mfa_requiredbooleanrequired
mfa_required_for_selectedbooleanrequired

The organization requires a second factor from the marked people and from its administrators.

organization_idstringrequired
password_max_age_daysintegerrequired
can be null
password_min_lengthintegerrequired
can be null
password_sign_in_enabledbooleanrequired

False when the organization allows SSO only. Null inherits the installation.

can be null
session_idle_timeout_secondsintegerrequired
can be null
session_max_lifetime_secondsintegerrequired
can be null
credentials_read_limit_per_hourintegerrequired

Organization override of the hourly reveal limit per caller. Null inherits.

can be null
credentials_show_oncebooleanrequired

True when a stored secret is shown once after it is issued.

members_link_sign_in_methodsbooleanrequired

True when members add sign-in methods to themselves in Account security.

suspend_people_connector_losesbooleanrequired

True when a connector suspends a person it no longer finds and who has no other source.

api_tokensAPITokenPolicySettingsrequired

Stored API token settings of the organization. Null means the installation default.

6 fields
default_lifetime_daysintegerrequired
can be null
max_lifetime_daysintegerrequired
can be null
security_max_lifetime_daysintegerrequired
can be null
networks_requiredbooleanrequired
unused_disable_daysintegerrequired
can be null
cap_existingbooleanrequired
revisioninteger · int64required

Policy revision. Every save increments it. A save names the revision it was read at.

min 1
updated_atstringrequired
400

Bad Request - a value is weaker than the installation or out of range

403

Forbidden: the caller's roles do not grant the permission of the operation, or the administrator's second factor 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).

409

Conflict: the policy was saved since the revision in the request (details.error_code version_mismatch). Read the policy again and save over the current revision.

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

↑ ↓ to moveEnter to openEsc to close