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 (
revisionandmfa_requiredrequired). Omitted ornullfields inherit installation defaults (omittedcredentials_show_oncekeeps its value). 409(version_mismatch) on stalerevision,400if weaker than installation.- Needs MFA step-up, or a token with
allow_security_changes(403 auth.api_token_not_allowed).
Parameters
Organization ID (UUID)
Request body application/json · OrganizationPolicyRequest
Organization security policy
Policy revision the values were read at (dto.OrganizationPolicyResponse.revision).
Require a second factor from every member before a console session is issued.
Only false is accepted. Turns off the forgot-password form for Principal users.
How long a confirmed second factor covers sensitive changes. At most the installation value.
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.
Days after which a Principal password expires and must be reset.
Minimum Principal password length. At least the installation minimum.
Only false is accepted. Principal users then sign in to applications through SSO only.
Console idle timeout. At most the installation value.
Absolute console session length. At most the installation value.
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).
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 add sign-in methods to themselves in Account security. Off at first. Omitted keeps the stored value.
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
Lifetime the console offers for a new token.
Longest lifetime of a new token or a replaced secret. 366 days is the ceiling of the installation.
Longest lifetime of a token issued with allow_security_changes.
Require the networks a new token is accepted from. Omitted means false.
Days without use after which the periodic check disables a token. 0 turns the check off.
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
OK
OrganizationPolicyResponse · 19 fields
False when the organization turned the form off. Null inherits the installation.
Installation values an organization inherits and may only tighten.
8 fields
True when the installation offers the forgot-password form to Principal users.
True when the installation offers second factors.
Hourly reveal limit per caller that an organization without an override uses.
Installation defaults of the API token settings.
6 fields
Lifetime the console offers for a new token.
Longest lifetime of a new token or a replaced secret.
Longest lifetime of a token issued with allow_security_changes. Never more than max_lifetime_days.
A new token must name the networks it is accepted from.
Days without use after which the periodic check disables a token. 0 turns the check off.
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
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
Inclusive range of a numeric setting.
2 fields
The organization requires a second factor from the marked people and from its administrators.
False when the organization allows SSO only. Null inherits the installation.
Organization override of the hourly reveal limit per caller. Null inherits.
True when a stored secret is shown once after it is issued.
True when members add sign-in methods to themselves in Account security.
True when a connector suspends a person it no longer finds and who has no other source.
Stored API token settings of the organization. Null means the installation default.
6 fields
Policy revision. Every save increments it. A save names the revision it was read at.
Bad Request - a value is weaker than the installation or out of range
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).
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.