---
title: "Creates a new SSO provider"
method: POST
path: "/v1/projects/{ref}/config/auth/sso/providers"
tags: ["Auth"]
---

# Creates a new SSO provider

`POST /v1/projects/{ref}/config/auth/sso/providers`

## Path parameters

- `ref` string, required

## Request body

- CreateProviderBody
  - `type` 'saml', required — What type of provider will be created
  - `metadata_xml` string
  - `metadata_url` string
  - `domains` string[]
  - `attribute_mapping` object
    - `keys` object, required
  - `name_id_format` 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'

## Response `201`

- CreateProviderResponse
  - `id` string, required
  - `saml` object
    - `id` string, required
    - `entity_id` string, required
    - `metadata_url` string
    - `metadata_xml` string
    - `attribute_mapping` object
      - `keys` object, required
    - `name_id_format` 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified' | 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' | 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' | 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'
  - `domains` object[]
    - `id` string, required
    - `domain` string
    - `created_at` string
    - `updated_at` string
  - `created_at` string
  - `updated_at` string

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `404` — SAML 2.0 support is not enabled for this project
- `429` — Rate limit exceeded

---

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