SSO Configuration
Configure SAML 2.0 and OIDC single sign-on for enterprise authentication.
SSO Configuration
Metalogue supports enterprise SSO via SAML 2.0 and OpenID Connect (OIDC).
Supported Providers
SAML 2.0
- Okta
- Azure AD
- OneLogin
- Ping Identity
- Generic SAML 2.0
OIDC
- Okta
- Azure AD
- Google Workspace
- Auth0
- Generic OIDC
Quick Setup
Okta (SAML)
- Create a new SAML app in Okta Admin
- Configure:
- Single Sign On URL:
https://api.metalogue.xyz/v1/auth/saml/callback - Audience URI:
https://api.metalogue.xyz - Name ID format: EmailAddress
- Single Sign On URL:
- Copy the IdP metadata URL
- Configure in Metalogue:
POST /v1/auth/sso/saml
Content-Type: application/json
{
"idp_entity_id": "http://www.okta.com/exk...",
"idp_sso_url": "https://company.okta.com/app/.../sso/saml",
"idp_certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"attribute_mapping": {
"email": "email",
"name": "displayName",
"groups": "groups"
}
}
Azure AD (OIDC)
- Register an app in Azure AD
- Add redirect URI:
https://api.metalogue.xyz/v1/auth/oidc/callback - Create a client secret
- Configure in Metalogue:
POST /v1/auth/sso/oidc
Content-Type: application/json
{
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"issuer_url": "https://login.microsoftonline.com/{tenant}/v2.0",
"scopes": ["openid", "profile", "email"]
}
API Reference
Configure SAML
POST /v1/auth/sso/saml
Content-Type: application/json
{
"idp_entity_id": "string",
"idp_sso_url": "string",
"idp_certificate": "string",
"attribute_mapping": {
"email": "string",
"name": "string",
"groups": "string"
}
}
Configure OIDC
POST /v1/auth/sso/oidc
Content-Type: application/json
{
"client_id": "string",
"client_secret": "string",
"issuer_url": "string",
"scopes": ["openid", "profile", "email"]
}
Get SP Metadata
GET /v1/auth/sso/saml/metadata
Returns XML metadata for SAML Service Provider configuration.
Initiate SSO Login
GET /v1/auth/sso/login?tenant_id={tenant_id}
Redirects to configured IdP.
Get SSO Status
GET /v1/auth/sso/status
Response:
{
"enabled": true,
"provider_type": "saml",
"provider_name": "Okta",
"last_login": "2026-01-20T01:00:00Z"
}
Attribute Mapping
Map IdP attributes to Metalogue user fields:
| Metalogue Field | Common SAML Attributes |
|---|---|
email | email, NameID, mail |
name | displayName, firstName lastName |
groups | groups, memberOf |
Group-to-Role Mapping
Map IdP groups to Metalogue roles:
{
"group_mapping": {
"Metalogue-Admins": "admin",
"Metalogue-Users": "member",
"Metalogue-Viewers": "viewer"
}
}
SCIM Integration
For automated user provisioning, see SCIM Provisioning.
Testing SSO
- Test Mode: Enable test mode to validate without affecting production
- Dry Run: Test SAML response parsing
- Debug Logs: Enable verbose SSO logging
POST /v1/auth/sso/test
Content-Type: application/json
{
"test_mode": true
}
Troubleshooting
Common Issues
| Issue | Solution |
|---|---|
| Certificate expired | Upload new IdP certificate |
| Clock skew | Ensure server time is synchronized |
| Attribute not mapped | Check attribute mapping configuration |
| Redirect loop | Verify callback URL matches exactly |
Debug Mode
Enable debug logging:
PATCH /v1/auth/sso/config
Content-Type: application/json
{
"debug_mode": true
}
Check logs at /v1/audit?action=auth.sso*.
Security Considerations
- Use HTTPS - All SSO endpoints require HTTPS
- Certificate rotation - Plan for IdP certificate renewal
- Session management - Configure appropriate session TTL
- MFA enforcement - Enforce MFA at the IdP level
