Identity Provider

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
POST
GET
PATCH
DELETE
POST

List all identity provider configs

Required API key scopes

organization:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

GET /api/organizations/:organization_id/identity_provider_configs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/identity_provider_configs/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}
]
}

Create identity provider configs

Required API key scopes

organization:write

Request parameters

  • name
    string
  • saml_entity_id
    stringnull
  • saml_acs_url
    stringnull
  • saml_x509_cert
    stringnull
  • scim_enabled
    boolean
  • id_jag_issuer_url
    stringnull
  • id_jag_jwks_url
    stringnull
  • id_jag_allowed_clients
    array

Response


Example request

POST /api/organizations/:organization_id/identity_provider_configs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/identity_provider_configs/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}

Retrieve identity provider configs

Required API key scopes

organization:read

Path parameters

  • id
    string

Response


Example request

GET /api/organizations/:organization_id/identity_provider_configs/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/identity_provider_configs/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}

Update identity provider configs

Required API key scopes

organization:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • saml_entity_id
    stringnull
  • saml_acs_url
    stringnull
  • saml_x509_cert
    stringnull
  • scim_enabled
    boolean
  • id_jag_issuer_url
    stringnull
  • id_jag_jwks_url
    stringnull
  • id_jag_allowed_clients
    array

Response


Example request

PATCH /api/organizations/:organization_id/identity_provider_configs/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/identity_provider_configs/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"has_saml": true,
"saml_entity_id": "string",
"saml_acs_url": "string",
"saml_x509_cert": "string",
"has_scim": true,
"scim_enabled": true,
"scim_bearer_token": "string",
"has_id_jag": true,
"id_jag_issuer_url": "string",
"id_jag_jwks_url": "string",
"id_jag_allowed_clients": [
"string"
]
}

Delete identity provider configs

Required API key scopes

organization:write

Path parameters

  • id
    string

Example request

DELETE /api/organizations/:organization_id/identity_provider_configs/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/identity_provider_configs/:id/

Example response

Status 204 No response body

Create identity provider configs scim token

Regenerate the SCIM bearer token for this IdP config.

Path parameters

  • id
    string

Response


Example request

POST /api/organizations/:organization_id/identity_provider_configs/:id/scim/token
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/identity_provider_configs/:id/scim/token/

Example response

Status 200
RESPONSE
{
"scim_enabled": true,
"scim_bearer_token": "string"
}

Community questions