WorkOS Docs Homepage
Events
API referenceDashboardSign In
Event typesOverviewOverviewAuthentication eventsAuthentication eventsConnection eventsConnection eventsDirectory Sync eventsDirectory Sync eventsEmail verification eventsEmail verification eventsFeature flag eventsFeature flag eventsInvitation eventsInvitation eventsMagic Auth eventsMagic Auth eventsOrganization eventsOrganization eventsOrganization domain eventsOrganization domain eventsOrganization membership eventsOrganization membership eventsPassword reset eventsPassword reset eventsRole eventsRole eventsSession eventsSession eventsUser eventsUser eventsData syncingOverviewOverviewSyncing with events APISyncing with events APISyncing with webhooksSyncing with webhooksData reconciliationData reconciliationObservabilityStreaming to DatadogStreaming to Datadog
API Reference
API Reference
Integrations
Integrations
Migrate to WorkOS
Migrate to WorkOS
SDKs
SDKs

Connection events

Events emitted when Single Sign-On connections are changed.

On this page

  • Connection activated
  • Connection deactivated
  • Connection deleted
  • SAML certificate renewed
  • SAML certificate renewal required

Events emitted when Single Sign-On connections are activated, deactivated, or deleted. Also emitted when a SAML certificate is renewed for the connection.

Connection activated

Event name: connection.activated

Triggered when a connection is activated.

Payload data corresponds to the Connection object.

Connection activated event
JSON
{
"event": "connection.activated",
"id": "event_10FKJ843CVE8F7BXQSPFH0M53V",
"data": {
"object": "connection",
"id": "conn_01EHWNC0FCBHZ3BJ7EGKYXK0E6",
"organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
"state": "active",
"connection_type": "OktaSAML",
"name": "Foo Corp's Connection",
"created_at": "2021-06-25T19:07:33.155Z",
"updated_at": "2021-06-25T19:07:33.155Z",
"domains": [
{
"id": "org_domain_01EHWNFTAFCF3CQAE5A9Q0P1YB",
"object": "connection_domain",
"domain": "foo-corp.com"
}
]
},
"created_at": "2021-06-25T19:07:33.155Z",
"context": {}
}

Connection deactivated

Event name: connection.deactivated

Triggered when a connection is deactivated.

Payload data corresponds to the Connection object.

Connection deactivated event
JSON
{
"event": "connection.deactivated",
"id": "event_11FKJ843CVE8F7BXQSPFH0M53V",
"data": {
"object": "connection",
"id": "conn_01EHWNC0FCBHZ3BJ7EGKYXK0E6",
"organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
"state": "inactive",
"connection_type": "OktaSAML",
"name": "Foo Corp's Connection",
"created_at": "2021-06-25T19:07:33.155Z",
"updated_at": "2021-06-25T19:07:33.155Z",
"domains": [
{
"id": "org_domain_01EHWNFTAFCF3CQAE5A9Q0P1YB",
"object": "connection_domain",
"domain": "foo-corp.com"
}
]
},
"created_at": "2021-06-25T19:07:33.155Z",
"context": {}
}

Connection deleted

Event name: connection.deleted

Triggered when a connection is deleted. The state attribute indicates connection state before deletion.

Payload data corresponds to the Connection object.

Connection deleted event
JSON
{
"event": "connection.deleted",
"id": "event_12FKJ843CVE8F7BXQSPFH0M53V",
"data": {
"object": "connection",
"id": "conn_01EHWNC0FCBHZ3BJ7EGKYXK0E6",
"organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
"state": "inactive",
"connection_type": "OktaSAML",
"name": "Foo Corp's Connection",
"created_at": "2021-06-25T19:07:33.155Z",
"updated_at": "2021-06-25T19:07:33.155Z",
"domains": [
{
"id": "org_domain_01EHWNFTAFCF3CQAE5A9Q0P1YB",
"object": "connection_domain",
"domain": "foo-corp.com"
}
]
},
"created_at": "2021-06-25T19:07:33.155Z",
"context": {}
}

SAML certificate renewed

Event name: connection.saml_certificate_renewed

Triggered when a SAML certificate is renewed either in the Dashboard or Admin Portal.

The certificate_type can be one of ResponseSigning, RequestSigning, or ResponseEncryption.

Connection certificate renewed event
JSON
{
"event": "connection.saml_certificate_renewed",
"id": "event_12FKJ843CVE8F7BXQSPFH0M53V",
"data": {
"connection": {
"id": "conn_12FKJ843CVE8F7BXQSPFH0M53V",
"organization_id": "org_12FKJ843CVE8F7BXQSPFH0M53V"
},
"certificate": {
"certificate_type": "ResponseSigning",
"expiry_date": "2025-06-28T19:07:33.155Z"
},
"renewed_at": "2021-06-25T19:07:33.155Z"
},
"created_at": "2021-06-25T19:07:33.155Z",
"context": {}
}

SAML certificate renewal required

Event name: connection.saml_certificate_renewal_required

Triggered when a SAML certificate is expiring (multiple events are sent out as it approaches expiry), or expired (once every 7 days after expiry).

The certificate_type can be one of ResponseSigning, RequestSigning, or ResponseEncryption.

Connection certificate renewal required event
JSON
{
"event": "connection.saml_certificate_renewal_required",
"id": "event_12FKJ843CVE8F7BXQSPFH0M53V",
"data": {
"connection": {
"id": "conn_12FKJ843CVE8F7BXQSPFH0M53V",
"organization_id": "org_12FKJ843CVE8F7BXQSPFH0M53V"
},
"certificate": {
"certificate_type": "ResponseSigning",
"expiry_date": "2021-06-28T19:07:33.155Z",
"is_expired": false
},
"days_until_expiry": 3
},
"created_at": "2021-06-25T19:07:33.155Z",
"context": {}
}
© WorkOS, Inc.
FeaturesAuthKitSingle Sign-OnDirectory SyncAdmin PortalFine-Grained Authorization
DevelopersDocumentationChangelogAPI Status
ResourcesBlogPodcastPricingSecuritySupport
CompanyAboutCustomersCareersLegalPrivacy
© WorkOS, Inc.