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

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

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

Attach OCI Auth configuration onto machine identity

## Path parameters

- `identityId` string, required

## Request body

- object
  - `tenancyOcid` string, required — The OCID of your tenancy.
  - `allowedUsernames` string, nullable — The comma-separated list of trusted OCI account usernames that are allowed to authenticate with Infisical.
  - `accessTokenTrustedIps` object[] — The IPs or CIDR ranges that access tokens can be used from.
    - `ipAddress` string, required
  - `accessTokenTTL` integer — The lifetime for an access token in seconds.
  - `accessTokenMaxTTL` integer — The maximum lifetime for an access token in seconds.
  - `accessTokenNumUsesLimit` integer — The maximum number of times that an access token can be used.

## Response `200`

Default Response

- object
  - `identityOciAuth` object, required
    - `id` string, uuid, required
    - `accessTokenTTL` number
    - `accessTokenMaxTTL` number
    - `accessTokenNumUsesLimit` number
    - `accessTokenTrustedIps` unknown
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `identityId` string, uuid, required
    - `type` string, required
    - `tenancyOcid` string, required
    - `allowedUsernames` string, nullable
    - `accessTokenPeriod` 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/885aef3e6c11/schema)
