---
title: "PATCH /providers/oauth2/{id}/"
method: PATCH
path: "/providers/oauth2/{id}/"
tags: ["providers"]
---

# PATCH /providers/oauth2/{id}/

`PATCH /providers/oauth2/{id}/`

OAuth2Provider Viewset

## Path parameters

- `id` integer, required

## Request body

- PatchedOAuth2ProviderRequest — OAuth2Provider Serializer
  - `name` string
  - `authentication_flow` string, uuid, nullable — Flow used for authentication when the associated application is accessed by an un-authenticated user.
  - `authorization_flow` string, uuid — Flow used when authorizing this provider.
  - `invalidation_flow` string, uuid — Flow used ending the session from a provider.
  - `property_mappings` string[]
  - `client_type` 'confidential' | 'public'
  - `grant_types` GrantTypeEnum[]
  - `client_id` string
  - `client_secret` string
  - `access_code_validity` string — Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
  - `access_token_validity` string — Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
  - `refresh_token_validity` string — Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
  - `refresh_token_threshold` string — When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3).
  - `include_claims_in_id_token` boolean — Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint.
  - `signing_key` string, uuid, nullable — Key used to sign the tokens.
  - `encryption_key` string, uuid, nullable — Key used to encrypt the tokens. When set, tokens will be encrypted and returned as JWEs.
  - `redirect_uris` RedirectURIRequest[]
    - `matching_mode` 'strict' | 'regex', required
    - `url` string, required
    - `redirect_uri_type` 'authorization' | 'logout'
  - `logout_uri` string, uri
  - `logout_method` 'backchannel' | 'frontchannel'
  - `sub_mode` 'hashed_user_id' | 'user_id' | 'user_uuid' | 'user_username' | 'user_email' | 'user_upn'
  - `issuer_mode` 'global' | 'per_provider'
  - `jwt_federation_sources` string[]
  - `jwt_federation_providers` integer[]

## Response `200`

- OAuth2Provider — OAuth2Provider Serializer
  - `pk` integer, required
  - `name` string, required
  - `authentication_flow` string, uuid, nullable — Flow used for authentication when the associated application is accessed by an un-authenticated user.
  - `authorization_flow` string, uuid, required — Flow used when authorizing this provider.
  - `invalidation_flow` string, uuid, required — Flow used ending the session from a provider.
  - `property_mappings` string[]
  - `component` string, required — Get object component so that we know how to edit the object
  - `assigned_application_slug` string, nullable, required — Internal application name, used in URLs.
  - `assigned_application_name` string, nullable, required — Application's display Name.
  - `assigned_backchannel_application_slug` string, nullable, required — Internal application name, used in URLs.
  - `assigned_backchannel_application_name` string, nullable, required — Application's display Name.
  - `verbose_name` string, required — Return object's verbose_name
  - `verbose_name_plural` string, required — Return object's plural verbose_name
  - `meta_model_name` string, required — Return internal model name
  - `client_type` 'confidential' | 'public'
  - `grant_types` GrantTypeEnum[]
  - `client_id` string
  - `client_secret` string
  - `access_code_validity` string — Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
  - `access_token_validity` string — Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
  - `refresh_token_validity` string — Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
  - `refresh_token_threshold` string — When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3).
  - `include_claims_in_id_token` boolean — Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint.
  - `signing_key` string, uuid, nullable — Key used to sign the tokens.
  - `encryption_key` string, uuid, nullable — Key used to encrypt the tokens. When set, tokens will be encrypted and returned as JWEs.
  - `redirect_uris` RedirectURI[], required
    - `matching_mode` 'strict' | 'regex', required
    - `url` string, required
    - `redirect_uri_type` 'authorization' | 'logout'
  - `logout_uri` string, uri
  - `logout_method` 'backchannel' | 'frontchannel'
  - `sub_mode` 'hashed_user_id' | 'user_id' | 'user_uuid' | 'user_username' | 'user_email' | 'user_upn'
  - `issuer_mode` 'global' | 'per_provider'
  - `jwt_federation_sources` string[]
  - `jwt_federation_providers` integer[]

## Other responses

- `400`
- `403`

---

[API](https://skmtc.dev/goauthentik/apis/authentik.md) · [All operations](https://skmtc.dev/goauthentik/apis/authentik/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/goauthentik/authentik/revisions/4e42e86021d7/schema)
