---
title: "Create Federation user source"
method: POST
path: "/resources/user-sources/v1/federation"
tags: ["User sources (pools)"]
---

# Create Federation user source

`POST /resources/user-sources/v1/federation`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/user-sources/v1/federation`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/user-sources/v1/federation/post.ts> (a function with typed inputs; its response is checked against the schema)

This route creates a new federation user source. A vendor token is required for this route.

## Request body

- CreateFederationUserSourceRequestDTO
  - `name` string, required: The user source name
  - `configuration` FederationUserSourceConfig, required
    - `syncOnLogin` boolean, required: Whether to sync user profile attributes on each login
    - `wellknownUrl` string, required: The url of the service provider
    - `clientId` string, required: The client id from the service provider
    - `secret` string, required: The secret from the service provider
    - `tenantConfig` union, required
      - UserSourceDynamicTenantConfig
        - `tenantIdFieldName` string, required: The attribute name of which the tenant id would be taken from
        - `tenantResolverType` 'dynamic', required
      - UserSourceStaticTenantConfig
        - `tenantId` string, required: The tenant id which all of the users would be added to
        - `tenantResolverType` 'static', required
      - UserSourceNewTenantConfig
        - `tenantResolverType` 'new', required
  - `appIds` string[]: The application ids to assign to this user source
  - `index` number, required: The user source index
  - `description` string: The user source description

## Response `201`

- CreateUserSourceResponse
  - `id` string, required
  - `name` string, required
  - `type` string, required
  - `appIds` string[], required
  - `description` string, required
  - `index` number, required

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
