Create SSO configuration for organization
Create SSO configuration for the current user’s organization.
Creates a new SAML SSO provider in Supabase and stores the configuration locally. This is a transactional operation that ensures both Supabase and local database are updated atomically.
Context:
- Only organization administrators can create SSO configurations
- Each organization can have only one SSO configuration
SAML Configuration:
- Provide either metadata_url OR metadata_xml, not both
- metadata_url: URL where Supabase can fetch SAML metadata
- metadata_xml: Raw SAML metadata XML content
- domains: Email domains that should authenticate via this provider
- attribute_mapping: Maps SAML attributes to user profile fields
Related Endpoints:
- GET /auth/sso - Get current SSO configuration
- PATCH /auth/sso - Update SSO metadata
- DELETE /auth/sso - Remove SSO configuration
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Body
Request model for creating an SSO provider via Supabase Management API.
Email domains for this provider
SAML attribute mappings
URL to fetch SAML metadata
1 - 2083Raw SAML metadata XML
SSO provider type
Response
SSO configuration created successfully
API response model for SSO organization configuration.
Creation timestamp
Supabase SSO provider ID
Last update timestamp
SAML attribute mappings
Email domains for this SSO provider
Whether the SSO provider is active
SAML metadata URL
Hash of SAML metadata XML
Associated organization ID