Update SSO metadata configuration
Update SSO metadata configuration for the current user’s organization.
Updates metadata-related fields only. This endpoint is restricted to updating:
- metadata_url: URL for fetching SAML metadata
- metadata_xml: Raw SAML metadata XML content
- domains: Email domains that should use this SSO provider
- attribute_mapping: SAML attribute to user profile field mappings
Context:
- Only metadata-related fields can be updated via this endpoint
- Updates both Supabase SSO provider and local database
- Changes are applied immediately
- Cannot update provider ID or organization association
Metadata Update Rules:
- Provide either metadata_url OR metadata_xml, not both
- Setting metadata_url clears any existing metadata_xml
- Setting metadata_xml clears any existing metadata_url
- Domains can be added, removed, or modified
- Attribute mappings are completely replaced if provided
Use Cases:
- Updating SAML metadata after IdP changes
- Adding or removing email domains
- Modifying attribute mapping for user profiles
- Rotating SAML certificates or endpoints
Related Endpoints:
- GET /auth/sso - Get current configuration
- 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 updating an SSO provider via Supabase Management API.
Updated attribute mappings
Updated email domains
Whether provider is active
Updated SAML metadata URL
1 - 2083Updated SAML metadata XML
Response
SSO configuration updated 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