Keycloak Identity Providers API

Manage identity providers for federated authentication

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 17

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /admin/realms/{realm}/identity-provider/import-config Import an identity provider from JSON · Import identity provider from JSON body #
Ask an LLM
“How do I import an identity provider configuration from a JSON file?”
“Can I load an OAuth identity provider into a realm from a JSON file?”
Tell an agent
Import an identity provider from this JSON configuration into realm {realm}.
Load the identity provider config file into {realm}.
GET /admin/realms/{realm}/identity-provider/instances List identity providers in a realm · List identity providers #
Ask an LLM
“Which identity providers are configured in my realm?”
“Can I list only the identity providers that trust email?”
Tell an agent
List identity providers in realm {realm}.
Show identity providers in {realm} that trust email.
POST /admin/realms/{realm}/identity-provider/instances Create an identity provider · Create a new identity provider #
Ask an LLM
“How do I add a new identity provider to a realm?”
“Can I create an identity provider that trusts the user's email address?”
Tell an agent
Create an identity provider in realm {realm} with provider id {providerId}.
Add an identity provider {displayName} to {realm} that trusts email.
GET /admin/realms/{realm}/identity-provider/instances/{alias} Get an identity provider · Get the identity provider #
Ask an LLM
“What configuration does a particular identity provider have?”
“Can I look up one identity provider by its alias?”
Tell an agent
Get identity provider {alias} in realm {realm}.
Show the configuration of identity provider {alias}.
PUT /admin/realms/{realm}/identity-provider/instances/{alias} Update an identity provider · Update the identity provider #
Ask an LLM
“How do I change the configuration of an existing identity provider?”
“Can I disable an identity provider without deleting it?”
Tell an agent
Update identity provider {alias} in realm {realm} with config {config}.
Disable identity provider {alias}.
DELETE /admin/realms/{realm}/identity-provider/instances/{alias} Delete an identity provider · Delete the identity provider #
Ask an LLM
“How do I remove an identity provider from a realm?”
“Can I delete an OAuth identity provider I no longer use?”
Tell an agent destructive · confirm first
Delete identity provider {alias} from realm {realm}.
Remove the {alias} identity provider.
GET /admin/realms/{realm}/identity-provider/instances/{alias}/export Export an identity provider's public broker config · Export public broker configuration for identity provider #
Ask an LLM
“How do I export the public broker configuration of an identity provider?”
“Can I get an identity provider's config in a specific format?”
Tell an agent
Export the public broker configuration of identity provider {alias} in realm {realm}.
Export identity provider {alias} as {format}.
GET /admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions Get an identity provider's client management permissions · Return object stating whether client Authorization permissions have been… #
Ask an LLM
“Are client authorization permissions enabled for an identity provider?”
“What management permissions does an identity provider have?”
Tell an agent
Get the client management permissions for identity provider {alias} in realm {realm}.
Check whether identity provider {alias} has client management permissions enabled.
PUT /admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions Set an identity provider's client management permissions · Return object stating whether client Authorization permissions have been… #
Ask an LLM
“How do I enable client authorization permissions on an identity provider?”
“Can I change the scope permissions an identity provider has?”
Tell an agent
Set client management permissions on identity provider {alias} in {realm} to {enabled}.
Grant scope permissions {scopePermissions} to identity provider {alias}.
GET /admin/realms/{realm}/identity-provider/instances/{alias}/mapper-types List mapper types for an identity provider · Get mapper types for identity provider #
Ask an LLM
“What mapper types can I use with an identity provider?”
“Which mapper types does a given identity provider support?”
Tell an agent
List the mapper types for identity provider {alias} in realm {realm}.
Show which mapper types {alias} supports.
GET /admin/realms/{realm}/identity-provider/instances/{alias}/mappers List mappers for an identity provider · Get mappers for identity provider #
Ask an LLM
“What mappers are attached to an identity provider?”
“Can I see the mapping rules for a social login identity provider?”
Tell an agent
List mappers for identity provider {alias} in realm {realm}.
Show the mapping rules on {alias}.
POST /admin/realms/{realm}/identity-provider/instances/{alias}/mappers Add a mapper to an identity provider · Add a mapper to identity provider #
Ask an LLM
“How do I map a social identity claim to a Keycloak user attribute?”
“Can I add a new mapper to an existing identity provider?”
Tell an agent
Add a {identityProviderMapper} mapper named {name} to identity provider {alias} in {realm}.
Map {config} to identity provider {alias}.
GET /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id} Get an identity provider mapper · Get mapper by id for the identity provider #
Ask an LLM
“How do I read one mapper attached to an identity provider instance?”
“Can I fetch a single identity provider mapper by id?”
Tell an agent
Get identity provider mapper {id} for {alias} in realm {realm}.
Show mapping {id} on login provider {alias}.
PUT /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id} Update an identity provider mapper · Update a mapper for the identity provider #
Ask an LLM
“How do I change the settings of an existing identity provider mapper?”
“Can I rename a mapper attached to an identity provider?”
Tell an agent
Update identity provider mapper {id} for {alias} in realm {realm}.
Rename mapper {id} on instance {alias} to {name}.
DELETE /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id} Delete an identity provider mapper · Delete a mapper for the identity provider #
Ask an LLM
“How do I remove a mapper from an identity provider?”
“Can I delete a single mapping rule on a social login provider?”
Tell an agent destructive · confirm first
Delete mapper {id} from identity provider {alias} in realm {realm}.
Remove the {id} mapper on {alias}.
GET /admin/realms/{realm}/identity-provider/instances/{alias}/reload-keys Reload keys for an identity provider · Reaload keys for the identity provider if the provider supports it, "true" is… #
Ask an LLM
“How do I force an identity provider to reload its public keys?”
“Can I refresh the signing keys of a social identity provider?”
Tell an agent
Reload the keys for identity provider {alias} in realm {realm}.
Force identity provider {alias} to reload its public keys.
GET /admin/realms/{realm}/identity-provider/providers/{provider_id} Get an identity provider factory · Get the identity provider factory for that provider id #
Ask an LLM
“Which registration page and icon does a given identity provider use?”
“How do I look up an identity provider's factory by its id?”
Tell an agent
Get the identity provider factory for {provider_id} in realm {realm}.
Show registration config for identity provider {provider_id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/keycloak:keycloak-identity-providers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

keycloak-identity-providers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Identity Providers API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:
- name: Identity Providers
paths:
  /admin/realms/{realm}/identity-provider/import-config:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    post:
      tags:
      - Identity Providers
      summary: Import identity provider from JSON body
      description: Import identity provider from uploaded JSON file
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      operationId: postAdminRealmsByRealmIdentityProviderImportConfig
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: List identity providers
      parameters:
      - name: briefRepresentation
        in: query
        description: 'Boolean which defines whether brief representations are returned (default: false)'
        schema:
          type: boolean
      - name: capability
        in: query
        description: Filter by identity providers capability
        schema:
          type: string
      - name: first
        in: query
        description: Pagination offset
        schema:
          format: int32
          type: integer
      - name: max
        in: query
        description: Maximum results size (defaults to 100)
        schema:
          format: int32
          type: integer
      - name: realmOnly
        in: query
        description: 'Boolean which defines if only realm-level IDPs (not associated with orgs) should be returned (default: false)'
        schema:
          type: boolean
      - name: search
        in: query
        description: Filter specific providers by name. Search can be prefix (name*), contains (*name*) or exact ("name"). Default prefixed.
        schema:
          type: string
      - name: type
        in: query
        description: Filter by identity providers type
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdentityProviderRepresentation'
      operationId: getAdminRealmsByRealmIdentityProviderInstances
      x-operation-id-source: derived
    post:
      tags:
      - Identity Providers
      summary: Create a new identity provider
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentityProviderRepresentation'
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
        '409':
          description: Conflict
      operationId: postAdminRealmsByRealmIdentityProviderInstances
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Get the identity provider
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityProviderRepresentation'
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAlias
      x-operation-id-source: derived
    put:
      tags:
      - Identity Providers
      summary: Update the identity provider
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentityProviderRepresentation'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '409':
          description: Conflict
      operationId: putAdminRealmsByRealmIdentityProviderInstancesByAlias
      x-operation-id-source: derived
    delete:
      tags:
      - Identity Providers
      summary: Delete the identity provider
      responses:
        '200':
          description: OK
      operationId: deleteAdminRealmsByRealmIdentityProviderInstancesByAlias
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}/export:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Export public broker configuration for identity provider
      parameters:
      - name: format
        in: query
        description: Format to use
        schema:
          type: string
      responses:
        '200':
          description: OK
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAliasExport
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Return object stating whether client Authorization permissions have been…
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementPermissionReference'
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAliasManagementPermissions
      x-operation-id-source: derived
    put:
      tags:
      - Identity Providers
      summary: Return object stating whether client Authorization permissions have been…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagementPermissionReference'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementPermissionReference'
      operationId: putAdminRealmsByRealmIdentityProviderInstancesByAliasManagementPermissions
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}/mapper-types:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Get mapper types for identity provider
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/IdentityProviderMapperTypeRepresentation'
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAliasMapperTypes
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}/mappers:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Get mappers for identity provider
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdentityProviderMapperRepresentation'
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAliasMappers
      x-operation-id-source: derived
    post:
      tags:
      - Identity Providers
      summary: Add a mapper to identity provider
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentityProviderMapperRepresentation'
      responses:
        '200':
          description: OK
      operationId: postAdminRealmsByRealmIdentityProviderInstancesByAliasMappers
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Get mapper by id for the identity provider
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityProviderMapperRepresentation'
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAliasMappersById
      x-operation-id-source: derived
    put:
      tags:
      - Identity Providers
      summary: Update a mapper for the identity provider
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentityProviderMapperRepresentation'
      responses:
        '204':
          description: No Content
      operationId: putAdminRealmsByRealmIdentityProviderInstancesByAliasMappersById
      x-operation-id-source: derived
    delete:
      tags:
      - Identity Providers
      summary: Delete a mapper for the identity provider
      parameters:
      - name: id
        in: path
        description: Mapper id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
      operationId: deleteAdminRealmsByRealmIdentityProviderInstancesByAliasMappersById
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/instances/{alias}/reload-keys:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: alias
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Reaload keys for the identity provider if the provider supports it, "true" is…
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: boolean
      operationId: getAdminRealmsByRealmIdentityProviderInstancesByAliasReloadKeys
      x-operation-id-source: derived
  /admin/realms/{realm}/identity-provider/providers/{provider_id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Identity Providers
      summary: Get the identity provider factory for that provider id
      parameters:
      - name: provider_id
        in: path
        description: The provider id to get the factory
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      operationId: getAdminRealmsByRealmIdentityProviderProvidersByProviderId
      x-operation-id-source: derived
components:
  schemas:
    ManagementPermissionReference:
      type: object
      properties:
        enabled:
          type: boolean
        resource:
          type: string
        scopePermissions:
          type: object
          additionalProperties:
            type: string
    ConfigPropertyRepresentation:
      type: object
      properties:
        name:
          type: string
        label:
          type: string
        helpText:
          type: string
        type:
          type: string
        defaultValue: {}
        options:
          type: array
          items:
            type: string
        secret:
          type: boolean
        required:
          type: boolean
        readOnly:
          type: boolean
    IdentityProviderMapperTypeRepresentation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        category:
          type: string
        helpText:
          type: string
        properties:
          type: array
          items:
            $ref: '#/components/schemas/ConfigPropertyRepresentation'
    OrganizationIdentityProviderLinkRepresentation:
      type: object
      properties:
        organizationId:
          type: string
        autoMembership:
          type: boolean
        membershipType:
          type: string
    IdentityProviderRepresentation:
      type: object
      properties:
        alias:
          type: string
        displayName:
          type: string
        internalId:
          type: string
        providerId:
          type: string
        enabled:
          type: boolean
        updateProfileFirstLoginMode:
          type: string
          deprecated: true
        trustEmail:
          type: boolean
        storeToken:
          type: boolean
        addReadTokenRoleOnCreate:
          type: boolean
        authenticateByDefault:
          type: boolean
        linkOnly:
          type: boolean
        hideOnLogin:
          type: boolean
        firstBrokerLoginFlowAlias:
          type: string
        postBrokerLoginFlowAlias:
          type: string
        organizationLinks:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationIdentityProviderLinkRepresentation'
        config:
          type: object
          additionalProperties:
            type: string
        types:
          type: array
          items:
            type: string
        updateProfileFirstLogin:
          type: boolean
          deprecated: true
        organizationId:
          type: string
          writeOnly: true
          deprecated: true
    IdentityProviderMapperRepresentation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        identityProviderAlias:
          type: string
        identityProviderMapper:
          type: string
        config:
          type: object
          additionalProperties:
            type: string