B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

SSO

/

Delete Verification Certificate

Delete SAML Verification Certificate

The Delete SAML Verification Certificate method wraps the Delete Verification Certificate API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to delete verification certificates in other Organizations.

You may need to do this when rotating certificates from your IdP, since Stytch allows a maximum of 5 certificates per connection. There must always be at least one certificate per active connection.


Method parameters


connection_id*string

certificate_id*string
import { useStytchB2BClient } from '@stytch/react/b2b';

export const DeleteVerificationCertificate = () => {
  const stytch = useStytchB2BClient();

  const deleteVerificationCertificate = () => {
    stytch.sso.saml.deleteVerificationCertificate({
      connection_id: 'saml-connection-test-51861cbc-d3b9-428b-9761-227f5fb12be9',
      certificate_id: 'saml-verification-key-test-5ccbc642-9373-42b8-928f-c1646c868701',
    });
  };

  return <button onClick={deleteVerificationCertificate}>Delete Verification Certificate</button>;
};

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "certificate_id": "saml-verification-key-test-5ccbc642-9373-42b8-928f-c1646c868701",
}