# Create Federation user source Create a new federation user source. A valid environment token is required to call this endpoint. Endpoint: POST /resources/user-sources/v1/federation Security: bearer ## Request fields (application/json): - `name` (string, required) The user source name - `configuration` (object, required) 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.clientId` (string, required) The client id from the service provider - `configuration.secret` (string, required) The secret from the service provider - `configuration.tenantConfig` (any, required) - `appIds` (array) The application Ids to assign to this user source - `index` (number, required) The user source index - `description` (string) The user source description ## Response 201 fields (application/json): - `id` (string, required) - `name` (string, required) - `type` (string, required) - `appIds` (array, required) - `description` (string, required) - `index` (number, required)