---
title: "List HCP Terraform persona mappings"
method: GET
path: "/api/v2/wif/terraform/persona_mapping"
tags: ["Cloud Authentication"]
---

# List HCP Terraform persona mappings

`GET /api/v2/wif/terraform/persona_mapping`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/wif/terraform/persona_mapping`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `workload_identity_federation_read`

List all HCP Terraform persona mappings in the organization. Each mapping associates an HCP Terraform workload identity token issuer and `sub` claim pattern with a Datadog user or service account.

## Response `200`

OK

- TerraformCloudAuthPersonaMappingsResponse: Response containing a list of HCP Terraform persona mappings.
  - `data` TerraformCloudAuthPersonaMappingDataResponse[], required: Configured HCP Terraform persona mappings.
    - `attributes` TerraformCloudAuthPersonaMappingAttributesResponse, required: Stored HCP Terraform persona mapping attributes.
      - `account_identifier` string, required: Handle of the mapped Datadog account, resolved when the mapping was created.
      - `account_uuid` string, required: UUID of the mapped Datadog user or service account.
      - `audience` string: Audience to set as the `TFC_WORKLOAD_IDENTITY_AUDIENCE_DATADOG` environment variable in HCP Terraform. Datadog computes this value as `datadog/<organization UUID>`.
      - `issuer_url` string: HCP Terraform workload identity token issuer. Empty for mappings created before the issuer was required.
      - `sub_pattern` string, required: Pattern matched against the `sub` claim of HCP Terraform workload identity tokens.
    - `id` string, required: Unique identifier of the persona mapping.
    - `type` 'terraform_cloud_auth_config', required: Type identifier for an HCP Terraform persona mapping.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `429`: Too many requests

## Changes

- **2026-11-20** `3b1c63e31740`: 4 warning
  - the optional response header `X-RateLimit-Limit` removed for the status `429`
  - the optional response header `X-RateLimit-Period` removed for the status `429`
  - the optional response header `X-RateLimit-Remaining` removed for the status `429`
  - the optional response header `X-RateLimit-Reset` removed for the status `429`
- **2026-11-19** `e80219fa3b5c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/changes/api/v2/wif/terraform/persona_mapping/get.md)

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/4ba32926196d?raw)
