---
title: "Register a new SSO provider."
method: POST
path: "/admin/sso/providers"
tags: ["admin"]
---

# Register a new SSO provider.

`POST /admin/sso/providers`

## Request body

- object
  - `type` 'saml', required
  - `metadata_url` string, uri
  - `metadata_xml` string
  - `domains` string[]
  - `attribute_mapping` SAMLAttributeMappingSchema
    - `keys` object

## Response `200`

SSO provider was created.

- SSOProviderSchema
  - `id` string, uuid
  - `sso_domains` object[]
    - `domain` string, hostname
  - `saml` object
    - `entity_id` string
    - `metadata_xml` string
    - `metadata_url` string
    - `attribute_mapping` SAMLAttributeMappingSchema
      - `keys` object

## Other responses

- `400` — HTTP Bad Request response. Can occur if the passed in JSON cannot be unmarshalled properly or when CAPTCHA verification was not successful. In certain cases can also occur when features are disabled on the server (e.g. sign ups). It may also mean that the operation failed due to some constraint not being met (such a user already exists for example).
- `401` — HTTP Unauthorized response.
- `403` — HTTP Forbidden response.

## Changes

- **2025-02-07** `4d0f1a6c1ad9` — 3 info
  - added the optional property `error_code` to the response with the `400` status
  - added the optional property `error_code` to the response with the `401` status
  - added the optional property `error_code` to the response with the `403` status
- **2023-12-13** `77f9aeb9339a` — 3 info
  - added the optional property `weak_password` to the response with the `400` status
  - added the optional property `weak_password` to the response with the `401` status
  - added the optional property `weak_password` to the response with the `403` status
- **2023-02-01** `144a34ca6d74` — 6 warning
  - removed the optional property `error_code` from the response with the `400` status
  - removed the optional property `error_code` from the response with the `401` status
  - removed the optional property `error_code` from the response with the `403` status
  - removed the optional property `weak_password` from the response with the `400` status
  - …2 more

[Change history](https://skmtc.dev/supabase/apis/supabase-auth-rest-api/changes/admin/sso/providers/post.md)

---

[API](https://skmtc.dev/supabase/apis/supabase-auth-rest-api.md) · [All operations](https://skmtc.dev/supabase/apis/supabase-auth-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/supabase-auth-rest-api/revisions/2e2a74a7459f/schema)
