Skip to content

Reference

Identity Providers

REST API reference for Identity Providers: manage the identity providers users can sign in with. 5 operations.

Reference4 min read

For the base URL, authentication and errors, see the REST API overview.

GET /v1/identity_providers ​

  • Request: GET /v1/identity_providers
  • Operation: ListIdentityProviders
  • Operation ID: IdentityProvider_List
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Example request

bash
curl 'https://YOUR_SERVER/v1/identity_providers' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "created": 1792263090753,
    "enabled": true,
    "identity_provider": "google",
    "modified": 1792263090753,
    "name": "Google",
    "type": "oidc"
  },
  {
    "created": 1792263090753,
    "enabled": true,
    "identity_provider": "entra",
    "modified": 1792263090753,
    "name": "Microsoft",
    "type": "oidc"
  }
]

POST /v1/identity_providers ​

  • Request: POST /v1/identity_providers
  • Operation: CreateIdentityProvider
  • Operation ID: IdentityProvider_Create
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Request body (application/json, required)

OpenID Connect provider for the console login. Disabled by default: set accounts.limits.identity_providers.max_count in the host settings (and restart). Register https://<brand domain>/oauth/callback as redirect URI in the provider, check it with POST /v1/identity_providers/{id}/test, and offer it on a domain with the brand config accounts.federated_login / accounts.identity_providers.

FieldTypeRequiredConstraintsDescription
attribute_mappingobjectno
attribute_mapping.companystringnoDefault: organizationClaim to use for company - not a standard OIDC claim
attribute_mapping.emailstringnoDefault: email
attribute_mapping.locationstringnoDefault: localeClaim to use for location
attribute_mapping.namestringnoDefault: name
attribute_mapping.picturestringnoDefault: picture
attribute_mapping.usernamestringnoDefault: preferred_usernameClaim to use for username
attribute_mapping.websitestringnoDefault: websiteClaim to use for profile URL
client_idstringyesOAuth2 client ID registered with the IdP
client_secretstringyesOAuth2 client secret
descriptionstringnoOptional description
displayobjectno
display.button_textstringno
display.logostringnoLogo as base64 data URL
domainstringyesIdentity provider domain, e.g. your-tenant.us.auth0.com
enabledbooleannoDefault: true
identity_providerstringyesPattern: ^[a-zA-Z0-9-_]{1,32}$Unique identifier for the identity provider
namestringyesDisplay name for the identity provider
provisioningobjectno
provisioning.allowed_domainsarray of stringnoAllowed email domains. Leave empty to allow all.
provisioning.email_trust_modestringnoOne of: trust_idp, verify_with_claim, always_verify
Default: verify_with_claim
Email verification mode
provisioning.modestringnoOne of: auto_provision, match_only
Default: auto_provision
User provisioning mode
scopesarray of stringnoDefault: ["openid","profile","email"]OAuth2 scopes to request
token_endpoint_auth_methodstringnoOne of: client_secret_post, client_secret_basic, none
Default: client_secret_post
Token endpoint authentication method
typestringyesOne of: oidcIdentity provider type - currently only OIDC supported

Example request: Google, existing accounts only

bash
curl -X POST 'https://YOUR_SERVER/v1/identity_providers' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "client_id": "<client-id>.apps.googleusercontent.com",
  "client_secret": "<client-secret>",
  "display": {
    "button_text": "Sign in with Google"
  },
  "domain": "accounts.google.com",
  "enabled": true,
  "identity_provider": "google",
  "name": "Google",
  "provisioning": {
    "email_trust_mode": "verify_with_claim",
    "mode": "match_only"
  },
  "type": "oidc"
}'

Example body: Microsoft Entra ID

json
{
  "client_id": "<application-id>",
  "client_secret": "<client-secret>",
  "display": {
    "button_text": "Sign in with Microsoft"
  },
  "domain": "login.microsoftonline.com/<tenant-id>/v2.0",
  "enabled": true,
  "identity_provider": "entra",
  "name": "Microsoft",
  "provisioning": {
    "allowed_domains": [
      "example.com"
    ],
    "email_trust_mode": "trust_idp",
    "mode": "auto_provision"
  },
  "scopes": [
    "openid",
    "profile",
    "email"
  ],
  "type": "oidc"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/identity_providers/{identity_provider} ​

  • Request: GET /v1/identity_providers/
  • Operation: ReadIdentityProviderConfig
  • Operation ID: IdentityProvider_ReadConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
identity_providerpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/identity_providers/YOUR_IDENTITY_PROVIDER' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200, Google, existing accounts only)

json
{
  "client_id": "<client-id>.apps.googleusercontent.com",
  "client_secret": "<client-secret>",
  "created": 1792263090753,
  "display": {
    "button_text": "Sign in with Google"
  },
  "domain": "accounts.google.com",
  "enabled": true,
  "identity_provider": "google",
  "modified": 1792263090753,
  "name": "Google",
  "provisioning": {
    "email_trust_mode": "verify_with_claim",
    "mode": "match_only"
  },
  "type": "oidc"
}

Response example (200, Microsoft Entra ID)

json
{
  "client_id": "<application-id>",
  "client_secret": "<client-secret>",
  "created": 1792263090753,
  "display": {
    "button_text": "Sign in with Microsoft"
  },
  "domain": "login.microsoftonline.com/<tenant-id>/v2.0",
  "enabled": true,
  "identity_provider": "entra",
  "modified": 1792263090753,
  "name": "Microsoft",
  "provisioning": {
    "allowed_domains": [
      "example.com"
    ],
    "email_trust_mode": "trust_idp",
    "mode": "auto_provision"
  },
  "scopes": [
    "openid",
    "profile",
    "email"
  ],
  "type": "oidc"
}

PUT /v1/identity_providers/{identity_provider} ​

  • Request: PUT /v1/identity_providers/
  • Operation: UpdateIdentityProvider
  • Operation ID: IdentityProvider_Update
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
identity_providerpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
attribute_mappingobjectno
attribute_mapping.companystringno
attribute_mapping.emailstringno
attribute_mapping.locationstringno
attribute_mapping.namestringno
attribute_mapping.picturestringno
attribute_mapping.usernamestringno
attribute_mapping.websitestringno
client_idstringno
client_secretstringno
descriptionstringno
displayobjectno
display.button_textstringno
display.logostringno
domainstringno
enabledbooleanno
namestringno
provisioningobjectno
provisioning.allowed_domainsarray of stringno
provisioning.email_trust_modestringnoOne of: trust_idp, verify_with_claim, always_verify
provisioning.modestringnoOne of: auto_provision, match_only
scopesarray of stringno
token_endpoint_auth_methodstringnoOne of: client_secret_post, client_secret_basic, none

Example request: Full Update

bash
curl -X PUT 'https://YOUR_SERVER/v1/identity_providers/YOUR_IDENTITY_PROVIDER' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "client_id": "<client-id>.apps.googleusercontent.com",
  "client_secret": "<client-secret>",
  "display": {
    "button_text": "Sign in with Google"
  },
  "domain": "accounts.google.com",
  "enabled": true,
  "identity_provider": "google",
  "name": "Google",
  "provisioning": {
    "email_trust_mode": "verify_with_claim",
    "mode": "match_only"
  },
  "type": "oidc"
}'

Example body: Update 'client_id'

json
{
  "client_id": "<client-id>.apps.googleusercontent.com"
}

Example body: Update 'client_secret'

json
{
  "client_secret": "<client-secret>"
}

Example body: Update 'display'

json
{
  "display": {
    "button_text": "Sign in with Google"
  }
}

Example body: Update 'domain'

json
{
  "domain": "accounts.google.com"
}

Example body: Update 'enabled'

json
{
  "enabled": true
}

Example body: Update 'name'

json
{
  "name": "Google"
}

Example body: Update 'provisioning'

json
{
  "provisioning": {
    "email_trust_mode": "verify_with_claim",
    "mode": "match_only"
  }
}

Example body: Update 'type'

json
{
  "type": "oidc"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/identity_providers/{identity_provider} ​

  • Request: DELETE /v1/identity_providers/
  • Operation: DeleteIdentityProvider
  • Operation ID: IdentityProvider_Delete
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
identity_providerpathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/identity_providers/YOUR_IDENTITY_PROVIDER' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden