---
title: Update identity provider overrides for a user
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Users
---

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

# Update identity provider overrides for a user{% #update-identity-provider-overrides-for-a-user %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/users/{user_id}/relationships/identity_providers |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/users/{user_id}/relationships/identity_providers |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/users/{user_id}/relationships/identity_providers      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/users/{user_id}/relationships/identity_providers      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/users/{user_id}/relationships/identity_providers  |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/users/{user_id}/relationships/identity_providers |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/users/{user_id}/relationships/identity_providers     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/users/{user_id}/relationships/identity_providers |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/users/{user_id}/relationships/identity_providers |

### Overview

Set the identity provider overrides for a specific user in the organization. Pass an empty list to remove all overrides, reverting the user to the organization's default identity providers. This endpoint requires the `user_access_manage` permission.

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



### Arguments

#### Path Parameters

| Name                      | Type   | Description         |
| ------------------------- | ------ | ------------------- |
| user_id [*required*] | string | The ID of the user. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                  | Type     | Description                                                                         |
| ------------ | ---------------------- | -------- | ----------------------------------------------------------------------------------- |
|              | data [*required*] | [object] | List of identity provider resource identifiers for a relationship update.           |
| data         | id [*required*]   | string   | The unique identifier of the identity provider.                                     |
| data         | type [*required*] | enum     | The resource type for identity providers. Allowed enum values: `identity_providers` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000001",
      "type": "identity_providers"
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Authentication error
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not found
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
 \# Path parameters export user_id="00000000-0000-9999-0000-000000000000" \# Curl command curl -X PATCH "https://api.datadoghq.com/api/v2/users/${user_id}/relationships/identity_providers" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000001",
      "type": "identity_providers"
    }
  ]
}
EOF 
                
{% /tab %}
