---
title: "Updates the authentication preferences associated with this Company."
method: POST
path: "/companies/{identifier}/auth/prefs"
tags: ["companies"]
---

# Updates the authentication preferences associated with this Company.

`POST /companies/{identifier}/auth/prefs`

Requires the privilege [`COMPANY_SECURITY_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Path parameters

- `identifier` string, required

## Request body

- UpdateCompanyAuthMethodPrefsRequest — Represents a request to update the authentication method preferences for a company. When not passed, value of the pref is set to the Gremlin decided default value
  - `allowSessionRenewal` boolean — If user sessions are allowed to be renewed. When set to `false`, users must login after their session expires. Default is `true`
  - `sessionDuration` integer — If user session duration should be configured (in minutes). Default and max is `720`, min is `5`. If AllowSessionRenewal is set, this field is ignored
  - `passwordEnabled` boolean — If password logins should be enabled
  - `mfaRequired` boolean — If MFA should be required for password logins
  - `googleEnabled` boolean — If logins via Google should be enabled
  - `oauthEnabled` boolean — If logins via OAuth should be enabled
  - `samlEnabled` boolean — If logins via SAML should be enabled
  - `claimsRequired` boolean — If SAML Claims should be required when logging in via SAML
  - `apiKeysEnabled` boolean — If API keys should be enabled
  - `apiKeysMaxSecondsToExpireEnabled` boolean — If API keys have a maximum lifespan
  - `apiKeysMaxSecondsToExpire` integer — The maximum number of seconds an API key can be valid for
  - `samlAliasesEnabled` boolean — If SAML Claims Aliases should be enabled
  - `samlForced` boolean — If logins via SAML should be required

## Response `default`

default response

## Other responses

- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege: COMPANY_SECURITY_WRITE

---

[API](https://skmtc.net/gremlin/apis/gremlin-api.md) · [All operations](https://skmtc.net/gremlin/apis/gremlin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gremlin/gremlin-api/versions/70fe938a0b35/schema)
