---
title: Get a Custom OIDC provider
description: Get a Custom OIDC provider by UUID.
breadcrumbs: Docs > API > Get a Custom OIDC provider
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get a Custom OIDC provider

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                             |
| ----------------- | ------------------------------------------------------------------------ |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/wif/oidc/provider/{provider_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/wif/oidc/provider/{provider_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/wif/oidc/provider/{provider_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/wif/oidc/provider/{provider_id}      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/wif/oidc/provider/{provider_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/wif/oidc/provider/{provider_id} |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/wif/oidc/provider/{provider_id} |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/wif/oidc/provider/{provider_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/wif/oidc/provider/{provider_id}  |

### Overview

Get a Custom OIDC provider by UUID.

This endpoint requires the `workload_identity_federation_read` permission.

OAuth apps require the `workload_identity_federation_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#cloud-authentication) to access this endpoint.

### Arguments

#### Path Parameters

| Field                    | Type   | Description                       |
| ------------------------ | ------ | --------------------------------- |
| provider_id [*required*] | string | UUID of the Custom OIDC provider. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Custom OIDC provider response.

| Parent field    | Field                   | Type      | Description                                                                                                                                                                                                                                                                         |
| --------------- | ----------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data [*required*]       | object    | Custom OIDC provider resource.                                                                                                                                                                                                                                                      |
| data            | attributes [*required*] | object    | Stored Custom OIDC provider attributes.                                                                                                                                                                                                                                             |
| attributes      | audiences               | [string]  | Expected token audiences. At least one audience is required. When `org_uuid_source` is `aud`, include datadog/{org_uuid} for the organization creating the provider.                                                                                                                |
| attributes      | created_at              | date-time | Time the configuration was created. Read-only.                                                                                                                                                                                                                                      |
| attributes      | created_by              | uuid      | UUID of the user who created the configuration. Read-only.                                                                                                                                                                                                                          |
| attributes      | discovery_type          | enum      | How the signing keys are discovered. Allowed enum values: `oidc_discovery`, `direct_jwks`.                                                                                                                                                                                          |
| attributes      | identity_claim_name     | string    | Claim used by legacy identity_pattern mappings and in identity logs. Default: `sub`.                                                                                                                                                                                                |
| attributes      | issuer_url              | string    | HTTPS issuer URL that must match the token issuer. For oidc_discovery, signing keys are located through the issuer discovery document.                                                                                                                                              |
| attributes      | jwks_url                | string    | HTTPS JSON Web Key Set URL. Required when `discovery_type` is `direct_jwks`.                                                                                                                                                                                                        |
| attributes      | org_uuid_claim_name     | string    | Optional name of the token claim containing the Datadog organization UUID.                                                                                                                                                                                                          |
| attributes      | org_uuid_source         | enum      | Source of the organization UUID in the signed token. The `aud` source accepts a datadog/{org_uuid} audience. Allowed enum values: `dd_org_uuid`, `aud`. Default: `dd_org_uuid`.                                                                                                     |
| attributes      | provider_name           | string    | Name identifying the provider within the organization.                                                                                                                                                                                                                              |
| attributes      | required_claims         | [object]  | Claim matchers required for every token from this provider, in addition to the persona mapping matchers. Shared issuers can require an exact tenant claim.                                                                                                                          |
| required_claims | claim [*required*]      | string    | Name of the token claim.                                                                                                                                                                                                                                                            |
| required_claims | mode                    | enum      | Case-sensitive matching mode. Exact compares strings. Glob matches the entire value: * matches any number of characters, including /, and ? matches one character. Other characters are literal; escaping is not supported. Allowed enum values: `exact`, `glob`. Default: `exact`. |
| required_claims | values [*required*]     | [string]  | Accepted values for this claim.                                                                                                                                                                                                                                                     |
| data            | id [*required*]         | uuid      | Unique resource identifier.                                                                                                                                                                                                                                                         |
| data            | type [*required*]       | enum      | Resource type. Allowed enum values: `custom_oidc_provider_config`. Default: `custom_oidc_provider_config`.                                                                                                                                                                          |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "audiences": [
        "datadog/00000000-0000-0000-0000-000000000001"
      ],
      "created_at": "2019-09-19T10:00:00.000Z",
      "created_by": "string",
      "discovery_type": "oidc_discovery",
      "identity_claim_name": "sub",
      "issuer_url": "https://issuer.example.com",
      "jwks_url": "https://issuer.example.com/keys",
      "org_uuid_claim_name": "dd_org_uuid",
      "org_uuid_source": "dd_org_uuid",
      "provider_name": "example-cluster",
      "required_claims": [
        {
          "claim": "sub",
          "mode": "exact",
          "values": [
            "system:serviceaccount:controllers:example-controller"
          ]
        }
      ]
    },
    "id": "00000000-0000-0000-0000-000000000004",
    "type": "custom_oidc_provider_config"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export provider_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/wif/oidc/provider/${provider_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
