# Update Federation user source

Update a federation user source.

A valid environment token is required to call this endpoint.

Endpoint: PUT /resources/user-sources/v1/federation/{id}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `id` (string, required)

## Request fields (application/json):

  - `name` (string)
    The user source name

  - `configuration` (object)
    User source configuration

  - `configuration.syncOnLogin` (boolean, required)
    Whether to sync user profile attributes on each login

  - `configuration.wellknownUrl` (string)
    The url of the service provider

  - `configuration.oauth2Config` (object)
    OAuth2 configuration (required if wellknownUrl is not provided)

  - `configuration.oauth2Config.authorizationUrl` (string, required)
    The authorization URL of the OAuth2 provider

  - `configuration.oauth2Config.tokenUrl` (string, required)
    The token URL of the OAuth2 provider

  - `configuration.oauth2Config.userInfoUrl` (string, required)
    The user info URL of the OAuth2 provider

  - `configuration.oauth2Config.scopes` (array)
    The scopes to request from the OAuth2 provider
    Example: ["openid","email","profile"]

  - `configuration.oauth2Config.grantTypes` (array)
    The OAuth2 grant types
    Example: ["authorization_code"]

  - `configuration.oauth2Config.codeChallengeMethods` (array)
    The PKCE code challenge methods
    Example: ["S256"]

  - `configuration.clientId` (string, required)
    The client id from the service provider

  - `configuration.secret` (string)
    The secret from the service provider

  - `configuration.usePkce` (boolean)
    Whether to use PKCE

  - `configuration.tenantConfig` (any, required)

  - `configuration.tenantConfig.tenantIdFieldName` (string, required)
    The attribute name of which the tenant id would be taken from

  - `configuration.tenantConfig.tenantResolverType` (string, required)
    Enum: "dynamic"

  - `configuration.tenantConfig.tenantId` (string, required)
    The tenant id which all of the users would be added to

  - `configuration.tenantConfig.tenantResolverType` (string, required)
    Enum: "static"

  - `configuration.tenantConfig.tenantResolverType` (string, required)
    Enum: "new"

  - `index` (number)
    The user source index

  - `description` (string)
    The user source description

