/
Contact usSee pricingStart building
    Introduction
    Overview
    Postman
    Organizations
      Organization object
      Create an organization
      Get an organization
      Update an organization
      Search for organizations
      Delete an organization
    Members
      Member object
      Create a Member
      Get a Member
      Get a Member (Dangerous)
      Update a Member
      Reactivate a Member
      Search for Members
      Unlink Retired Email
    • Delete

      • Delete a Member
        Delete Member password
        Delete Member MFA phone number
        Delete Member MFA TOTP
    RBAC
      Resource object
      Role object
      Scope object
      Get RBAC Policy
    Email magic links
    • Organization

      • Send login or signup email
        Send invite email
        Authenticate Magic Link
    • Discovery

      • Send discovery email
        Authenticate discovery Magic Link
    Email one-time passcodes (OTP)
    • Organization

      • Send login or signup OTP
        Authenticate OTP
    • Discovery

      • Send discovery OTP
        Authenticate discovery OTP
    OAuth
    • Discovery

      • Use Google for discovery
        Use Microsoft for discovery
        Use HubSpot for discovery
        Use Slack for discovery
        Use GitHub for discovery
        Authenticate discovery OAuth
    • Organization

      • Login with Google
        Login with Microsoft
        Login with HubSpot
        Login with Slack
        Login with GitHub
        Authenticate OAuth
    • Token

      • Get Google Access Token
        Get Microsoft Access Token
        Get HubSpot Access Token
        Get Slack Access Token
        Get GitHub Access Token
    Session management
      Session object
      Get JWKS
      Get Session
      Authenticate Session
      Exchange Session
      Revoke Session
      Migrate Session
    Single sign-on (SS0)
      SAML Connection object
      OIDC Connection object
      External Connection object
    • SAML

      • Create SAML Connection
        Update SAML Connection
        Update SAML Connection by Metadata URL
        Delete SAML Verification Certificate
    • OIDC

      • Create OIDC Connection
        Update OIDC Connection
        Get OIDC Access Token
    • External

      • Create External Connection
        Update External Connection
    • Shared

      • Get SSO Connections
        Delete SSO Connection
        Start SSO Authenticate
        Complete SSO Authenticate
    SCIM
      SCIM Connection Object
    • Connection management

      • Create SCIM Connection
        Update SCIM Connection
        Delete SCIM Connection
        Get SCIM Connection
    • Token management

      • Start SCIM Token Rotation
        Complete SCIM Token Rotation
        Cancel SCIM Token Rotation
    • SCIM groups

      • Get SCIM Connection Groups
    Discovery
      Discovered Organization object
      Create Organization via Discovery
      List Organizations
      Exchange Intermediate Session
    Passwords
      Authenticate
      Discovery Authenticate
      Strength check
      Migrate
    • Reset Options

      • Password reset by email start
        Password reset by email
        Password reset by existing password
        Password reset by session
        Discovery Password reset by email start
        Discovery Password reset by email
        Require Password reset by email
    Multi-Factor Authentication (MFA)
    • One-time passcodes

      • Send SMS OTP
        Authenticate SMS OTP
    • Time-based one-time passcodes

      • Create TOTP
        Authenticate TOTP
        Migrate TOTP
    • Recovery codes

      • Get recovery codes
        Recover
        Rotate recovery codes
    M2M Authentication
      M2M Client Object
    • TOKEN

      • Get Access Token
        Authenticate Access Token
    • M2M Client

      • Create M2M client
        Get M2M client
        Search M2M clients
        Update M2M client
        Delete M2M client
    • Rotate secret

      • Start secret rotation
        Rotate secret
        Cancel secret rotation
    Connected AppsBeta
      Get Access Token
    • Tokens

      • Connected App ID Token Object
        Connected App Access Token Object
    • Configuration

      • Get JWKS
        Get OpenID Configuration
    • Methods

      • Introspect Token
        Authenticate Access Token (Local)
        Exchange Access Token
        Revoke Token
        Get UserInfo
    Impersonation
      Authenticate Token
    Resources
      Organization authentication settings
      Common email domains
      Member states
      Email templates
      URL validation
      Metadata
      SAML overview
      SAML Certificates
    Errors
      Overview
      Error object
      400
      401
      403
      404
      405
      429
      499
      500
      503
Get support on SlackVisit our developer forum

Contact us

B2B Saas Authentication

/

API reference

/

Resources

/

SAML Certificates

Signing and Verification Certificates

Signing Certificates

When sending an authentication request to the IdP, Stytch sends a signature along with the request, indicating that the request came from Stytch. This signature can be verified using the Signing Certificate provided by Stytch, in the form of an X.509 certificate. This certificate is present on all SAML connection objects.

Some IdPs may call this a "signed request" or "Signature Validation", or have WantAuthnRequestsSigned="true" in their SAML configuration settings. This certificate should be uploaded to the IdP in order to make use of this optional feature.

You can update the signing certificate for a SAML connection by providing a PKCS1 format RSA private key (starting with "-----BEGIN RSA PRIVATE KEY-----") in the Update SAML Connection endpoint. Stytch will automatically generate a new X.509 certificate from this private key and return it in the signing_certificates array. This private key will also be used to sign future SAML SSO Authenticate Start requests.

Verification Certificates

When receiving an authentication response from the IdP, Stytch will verify that the response actually originates from the IdP.

Stytch will only accept an authentication response from the IdP if the signature of the response is correctly validated with the connection's stored Verification Certificate, which comes from the IdP. This X.509 certificate is uploaded to Stytch and stored with the specific SAML connection. In the API, you can provide the certificate on a SAML update request.

There is a limit of 5 verification certificates per SAML connection. You can delete a connection's certificate by calling the Delete Verification Certificate. endpoint.

When uploading a certificate to an IdP or passing a certificate to Stytch, you may encounter the certificate in the form of a PEM file. The signing certificate from Stytch's Create SAML Connection endpoint is provided as a raw string with newlines.

echo $SIGNING_CERTIFICATE > stytch_signing_certificate.pem
OBJECT
-----BEGIN CERTIFICATE-----
MIIFIjCCAwoCCQC8brjOdUXVjTANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJV
UzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEX
MBUGA1UECgwOU3R5dGNoIEVYQU1QTEUwHhcNMjMwMjA5MjMwMjA0WhcNMjQwMjA5
MjMwMjA0WjBTMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQG
A1UEBwwNU2FuIEZyYW5jaXNjbzEXMBUGA1UECgwOU3R5dGNoIEVYQU1QTEUwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDIRzEMPwjJgflImAYjSIfDMXCC
IBFhuhxY8/mnidMiMauGR+dEMP4Jlg8oOZSNMx8wfPH7aqRIM8dkj8BhJ3QUjQmA
XLSgYsBUSSMaELHCurPSdz+rHfUMfD/cag5GeyPM2KtBD3I/Du545SNeURwKaiB5
fwlfYblMGNFvB70KRpl/YkvBYL7knKTGe1K6NG56IyGhRguEpaksxBJ4RTXcNiWr
ENcrw88LUpJd+7cDTlLB+6N+hPWUS/91R5kbQw/GX23C6uUDxTtGimWvA+riV6OF
IjWf5oDWioZj9wUFXElw+mMm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