---
title: "Get a GitHub cloud authentication persona mapping"
method: GET
path: "/api/v2/wif/github/persona_mapping/{persona_mapping_id}"
tags: ["Cloud Authentication"]
---

# Get a GitHub cloud authentication persona mapping

`GET /api/v2/wif/github/persona_mapping/{persona_mapping_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/wif/github/persona_mapping/{persona_mapping_id}`
- 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`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/wif/github/persona_mapping/:persona_mapping_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a specific GitHub cloud authentication persona mapping by ID. This endpoint retrieves a single configured persona mapping that associates a GitHub Actions OIDC principal with a Datadog user. The mapped principal can request an impersonation token.

## Path parameters

- `persona_mapping_id` string, required

## Response `200`

OK

- GitHubCloudAuthPersonaMappingResponse: Response containing a single GitHub cloud authentication persona mapping.
  - `data` GitHubCloudAuthPersonaMappingDataResponse, required: Data for GitHub cloud authentication persona mapping response.
    - `attributes` GitHubCloudAuthPersonaMappingAttributesResponse, required: Attributes for GitHub cloud authentication persona mapping response.
      - `account_identifier` string, required: Datadog account identifier (email or handle) mapped to the GitHub principal.
      - `account_uuid` string, required: Datadog account UUID.
      - `claim_matchers` GitHubOIDCClaimPatterns, required: GitHub Actions OIDC claims to match against. Each field is a regular expression. The `sub` claim is required; all other claims are optional. A token matches only when all provided patterns match simultaneously (AND semantics).
        - `actor` string: Regular expression matched against the `actor` claim.
        - `actor_id` string: Regular expression matched against the `actor_id` claim.
        - `enterprise` string: Regular expression matched against the `enterprise` claim.
        - `enterprise_id` string: Regular expression matched against the `enterprise_id` claim.
        - `environment` string: Regular expression matched against the `environment` claim.
        - `event_name` string: Regular expression matched against the `event_name` claim.
        - `job_workflow_ref` string: Regular expression matched against the `job_workflow_ref` claim.
        - `ref` string: Regular expression matched against the `ref` claim.
        - `ref_type` string: Regular expression matched against the `ref_type` claim.
        - `repository` string: Regular expression matched against the `repository` claim.
        - `repository_id` string: Regular expression matched against the `repository_id` claim.
        - `repository_owner` string: Regular expression matched against the `repository_owner` claim.
        - `repository_owner_id` string: Regular expression matched against the `repository_owner_id` claim.
        - `repository_visibility` string: Regular expression matched against the `repository_visibility` claim.
        - `runner_environment` string: Regular expression matched against the `runner_environment` claim.
        - `sub` string, required: Regular expression matched against the entire `sub` (subject) claim, the primary GitHub Actions OIDC identifier (for example, `repo:<OWNER>/<REPO>:ref:refs/heads/main`). The pattern must begin with `repo:<OWNER>/`, where `<OWNER>` is a literal repository-owner name rather than a regular expression.
        - `workflow` string: Regular expression matched against the `workflow` claim.
        - `workflow_ref` string: Regular expression matched against the `workflow_ref` claim.
    - `id` string, required: Unique identifier for the persona mapping.
    - `type` 'github_oidc_auth_config', required: Type identifier for GitHub cloud authentication persona mapping.

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[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/3f70db624329?raw)
