---
title: "POST /api/v1/auth/universal-auth/identities/{identityId}"
method: POST
path: "/api/v1/auth/universal-auth/identities/{identityId}"
tags: ["Universal Auth"]
---

# POST /api/v1/auth/universal-auth/identities/{identityId}

`POST /api/v1/auth/universal-auth/identities/{identityId}`

Attach Universal Auth configuration onto machine identity

## Path parameters

- `identityId` string, required

## Request body

- object
  - `clientSecretTrustedIps` object[] — A list of IPs or CIDR ranges that the Client Secret can be used from together with the Client ID to get back an access token. You can use 0.0.0.0/0, to allow usage from any network address.
    - `ipAddress` string, required
  - `accessTokenTrustedIps` object[] — A list of IPs or CIDR ranges that access tokens can be used from. You can use 0.0.0.0/0, to allow usage from any network address.
    - `ipAddress` string, required
  - `accessTokenTTL` integer — The lifetime for an access token in seconds. This value will be referenced at renewal time.
  - `accessTokenMaxTTL` integer — The maximum lifetime for an access token in seconds. This value will be referenced at renewal time.
  - `accessTokenNumUsesLimit` integer — The maximum number of times that an access token can be used; a value of 0 implies infinite number of uses.
  - `accessTokenPeriod` integer — The period for an access token in seconds. This value will be referenced at renewal time. Default value is 0.
  - `lockoutEnabled` boolean — Whether the lockout feature is enabled.
  - `lockoutThreshold` number — The amount of times login must fail before locking the identity auth method.
  - `lockoutDurationSeconds` number — How long an identity auth method lockout lasts.
  - `lockoutCounterResetSeconds` number — How long to wait from the most recent failed login until resetting the lockout counter.

## Response `200`

Default Response

- object
  - `identityUniversalAuth` object, required
    - `id` string, uuid, required
    - `clientId` string, required
    - `accessTokenTTL` number
    - `accessTokenMaxTTL` number
    - `accessTokenNumUsesLimit` number
    - `clientSecretTrustedIps` unknown
    - `accessTokenTrustedIps` unknown
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `identityId` string, uuid, required
    - `accessTokenPeriod` number
    - `lockoutEnabled` boolean
    - `lockoutThreshold` number
    - `lockoutDurationSeconds` number
    - `lockoutCounterResetSeconds` number

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

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