---
id: sources-user-connections-oauth-update
title: "sources_user_connections_oauth_update"
description: "Source Viewset"
sidebar_label: "sources_user_connections_oauth_update"
hide_title: true
hide_table_of_contents: true
api: eJzFWGtv2zYU/SuEMGAb5lhZ2gJbPi3rss5A0wR5FNi6TKAt2mZDkSpJxXEN/fedS0q2/MgLyLAviWTyvg7PfVCLxJTCci+NHuTJYeJMZUfCZZUTNhsZrcWI1lxmeOWnWVXm3Iukl+TCjawsaQ1SF0GKfZRi5oTHcsktL4QX1iWHnxaJpE0l91MsaSzgTeZ4dqOpKHhyuEj8vAy/ai8mwib1poUjVmn5pRKs2cFuuaK3XGgvx3OpJ8xPpWNX8JudHsFX1jj1dhlEHxat+FJJKxCqt5Wor3uJ5xNyso08uY6bhPO/mnxOvgEGDzP0yMtSyVGAK/3syLPFdhBm+BkGt0Ba8+pCWMmV/IpYgZalQ/AS1qGliUliaaXTeYsYsbeQ+r3QE0B5+CPe+F37dvDmDVDjI8TgMm9uhN4lPrPSi1Ot5hEAHEelFB8q0QBSdyH61PWFoJKeNiYEcogmBrNC+DwCl9TreoJmnLYYVTA/D5QgOpHuG7xd1wF0V4JoEYOD/f3/AfnyZgcVyTOedyFrYRj8RjylTHmCGMUfHAjBKHU6DjA87PgzXV6e8tjYggO2pKpCnt0XwdmwYGFL3ebltq5dHn3rWC5dqficfYBYn+SdqiaPyw8Aj9VcsQgGI6s9BgxzZDa7On/vKEs7tH6zT9XEkxTE//m0x/e+Hu39tb/3c3b9wzdkWGjib96xPTRGCa5psaVZZE42Vmb2FMDWs2IziN+hhXlDbrMZ1LOuFVQicSddeCBuuH500hqlCmz6r3yIFsiqFrOO5VDJG9LMswJ5hD2u4wC3ls9hD4WhcI87Rqk9saYqX1rpyBQoAE26P8yid8KzmDJsKQVGoQVwz2aC3WiAM40AiVx6LAi2zLGtxLwVdmicyJ6WAufCV1Y36pAJa9KPaM9KVVmunm8kyj1qCz2XZ4XJhXpeMLJNyyDL7lNfGtTgeYbUlFoEO2RB6KqgZo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DL+tXWGSC4opwXrJjZjHr0b1NXZN0ReIrwghLryNju5dkvhKcKvU1L1W4ggEL/2De687WX12RdQaNp+E4oyaWD6jJoW/wUdTxoPBhvDbIlGYSCq0WqxHlXVzJ+3eVmOS9tqHzmeBdRRwpmHHJeUkzrUFJeYocKnrfwH3J+2j
sidebar_class_name: "put api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"sources_user_connections_oauth_update"}
>
</Heading>

<MethodEndpoint
  method={"put"}
  path={"/sources/user_connections/oauth/{id}/"}
>
  
</MethodEndpoint>



Source Viewset

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<details
  style={{"marginBottom":"1rem"}}
  className={"openapi-markdown__details"}
  data-collapsed={false}
  open={true}
>
  <summary
    style={{}}
  >
    <h3
      className={"openapi-markdown__details-summary-header-params"}
    >
      Path Parameters
    </h3>
  </summary><div>
    <ul>
      <ParamsItem
        className={"paramsItem"}
        param={{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this User OAuth Source Connection.","required":true}}
      >
        
      </ParamsItem>
    </ul>
  </div>
</details><MimeTabs
  className={"openapi-tabs__mime"}
>
  <TabItem
    label={"application/json"}
    value={"application/json-schema"}
  >
    <details
      style={{}}
      className={"openapi-markdown__details mime"}
      data-collapsed={false}
      open={true}
    >
      <summary
        style={{}}
        className={"openapi-markdown__details-summary-mime"}
      >
        <h3
          className={"openapi-markdown__details-summary-header-body"}
        >
          Body
        </h3><strong
          className={"openapi-schema__required"}
        >
          required
        </strong>
      </summary><div
        style={{"textAlign":"left","marginLeft":"1rem"}}
      >
        
      </div><ul
        style={{"marginLeft":"1rem"}}
      >
        <SchemaItem
          collapsible={false}
          name={"identifier"}
          required={true}
          schemaName={"string"}
          qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"}
          schema={{"type":"string","minLength":1,"maxLength":255}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"access_token"}
          required={false}
          schemaName={"string"}
          qualifierMessage={undefined}
          schema={{"type":"string","writeOnly":true,"nullable":true}}
        >
          
        </SchemaItem>
      </ul>
    </details>
  </TabItem>
</MimeTabs><div>
  <div>
    <ApiTabs
      label={undefined}
      id={undefined}
    >
      <TabItem
        label={"200"}
        value={"200"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"pk"}
                        required={true}
                        schemaName={"ID (integer)"}
                        qualifierMessage={undefined}
                        schema={{"type":"integer","readOnly":true,"title":"ID"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"user"}
                        required={true}
                        schemaName={"integer"}
                        qualifierMessage={undefined}
                        schema={{"type":"integer","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={true}
                        className={"schemaItem"}
                      >
                        <details
                          style={{}}
                          className={"openapi-markdown__details"}
                        >
                          <summary
                            style={{}}
                          >
                            <span
                              className={"openapi-schema__container"}
                            >
                              <strong
                                className={"openapi-schema__property"}
                              >
                                source
                              </strong><span
                                className={"openapi-schema__name"}
                              >
                                 object
                              </span><span
                                className={"openapi-schema__divider"}
                              >
                                
                              </span><span
                                className={"openapi-schema__required"}
                              >
                                required
                              </span>
                            </span>
                          </summary><div
                            style={{"marginLeft":"1rem"}}
                          >
                            <div
                              style={{"marginTop":".5rem","marginBottom":".5rem"}}
                            >
                              
                              
                              Source Serializer
                              
                              
                            </div><SchemaItem
                              collapsible={false}
                              name={"pk"}
                              required={true}
                              schemaName={"uuid"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","format":"uuid","readOnly":true,"title":"Pbm uuid"}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"name"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","description":"Source's display Name."}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"slug"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={"**Possible values:** `<= 50 characters`, Value must match regular expression `^[-a-zA-Z0-9_]+$`"}
                              schema={{"type":"string","description":"Internal source name, used in URLs.","maxLength":50,"pattern":"^[-a-zA-Z0-9_]+$"}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"enabled"}
                              required={false}
                              schemaName={"boolean"}
                              qualifierMessage={undefined}
                              schema={{"type":"boolean"}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"authentication_flow"}
                              required={false}
                              schemaName={"uuid"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","format":"uuid","nullable":true,"description":"Flow to use when authenticating existing users."}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"enrollment_flow"}
                              required={false}
                              schemaName={"uuid"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","format":"uuid","nullable":true,"description":"Flow to use when enrolling new users."}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"user_property_mappings"}
                              required={false}
                              schemaName={"uuid[]"}
                              qualifierMessage={undefined}
                              schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"group_property_mappings"}
                              required={false}
                              schemaName={"uuid[]"}
                              qualifierMessage={undefined}
                              schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"component"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","description":"Get object component so that we know how to edit the object","readOnly":true}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"verbose_name"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","description":"Return object's verbose_name","readOnly":true}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"verbose_name_plural"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","description":"Return object's plural verbose_name","readOnly":true}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"meta_model_name"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","description":"Return internal model name","readOnly":true}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"policy_engine_mode"}
                              required={false}
                              schemaName={"PolicyEngineMode (string)"}
                              qualifierMessage={"**Possible values:** [`all`, `any`]"}
                              schema={{"enum":["all","any"],"type":"string","title":"PolicyEngineMode"}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"user_matching_mode"}
                              required={false}
                              schemaName={"UserMatchingModeEnum (string)"}
                              qualifierMessage={"**Possible values:** [`identifier`, `email_link`, `email_deny`, `username_link`, `username_deny`]"}
                              schema={{"description":"How the source determines if an existing user should be authenticated or a new user enrolled.","enum":["identifier","email_link","email_deny","username_link","username_deny"],"type":"string","title":"UserMatchingModeEnum"}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"managed"}
                              required={true}
                              schemaName={"Managed by authentik (string)"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","nullable":true,"title":"Managed by authentik","description":"Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.","readOnly":true}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"user_path_template"}
                              required={false}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string"}}
                            >
                              
                            </SchemaItem><SchemaItem
                              collapsible={false}
                              name={"icon"}
                              required={true}
                              schemaName={"string"}
                              qualifierMessage={undefined}
                              schema={{"type":"string","nullable":true,"description":"Get the URL to the Icon. If the name is /static or\nstarts with http it is returned as-is","readOnly":true}}
                            >
                              
                            </SchemaItem>
                          </div>
                        </details>
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"created"}
                        required={true}
                        schemaName={"date-time"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","format":"date-time","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"identifier"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={"**Possible values:** `<= 255 characters`"}
                        schema={{"type":"string","maxLength":255}}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"pk\": 0,\n  \"user\": 0,\n  \"source\": {\n    \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    \"name\": \"string\",\n    \"slug\": \"string\",\n    \"enabled\": true,\n    \"authentication_flow\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    \"enrollment_flow\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    \"user_property_mappings\": [\n      \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n    ],\n    \"group_property_mappings\": [\n      \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n    ],\n    \"component\": \"string\",\n    \"verbose_name\": \"string\",\n    \"verbose_name_plural\": \"string\",\n    \"meta_model_name\": \"string\",\n    \"policy_engine_mode\": \"all\",\n    \"user_matching_mode\": \"identifier\",\n    \"managed\": \"string\",\n    \"user_path_template\": \"string\",\n    \"icon\": \"string\"\n  },\n  \"created\": \"2024-07-29T15:51:28.071Z\",\n  \"identifier\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem><TabItem
        label={"400"}
        value={"400"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"non_field_errors"}
                        required={false}
                        schemaName={"string[]"}
                        qualifierMessage={undefined}
                        schema={{"type":"array","items":{"type":"string"}}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"code"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        name={"property name*"}
                        required={false}
                        schemaName={"any"}
                        qualifierMessage={undefined}
                        schema={{"type":"object","description":"Validation Error","properties":{"non_field_errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}},"additionalProperties":{},"title":"ValidationError"}}
                        collapsible={false}
                        discriminator={false}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"non_field_errors\": [\n    \"string\"\n  ],\n  \"code\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem><TabItem
        label={"403"}
        value={"403"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"detail"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"code"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"detail\": \"string\",\n  \"code\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem>
    </ApiTabs>
  </div>
</div>
      