SSO connections
Configure enterprise SSO connections
Use the connection client to configure enterprise SSO (SAML/OIDC) for an organization.
Enable SSO after the organization exists: create a connection, complete IdP setup, and test sign-in for that org.
CreateConnection
Section titled “CreateConnection”#asyncCreateConnection
Runs CreateConnection and returns the result.
Request context
Organization ID.
Connection.
The created resource.
import ( connectionsv1 "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/connections")
created, err := scalekitClient.Connection().CreateConnection(ctx, "org_123", &connectionsv1.CreateConnection{ Provider: connectionsv1.ConnectionProvider_OKTA, Type: connectionsv1.ConnectionType_SAML, ProviderKey: "my-okta-connection",})if err != nil { // handle}_ = created.ConnectionDeleteConnection
Section titled “DeleteConnection”#asyncDeleteConnection
Runs DeleteConnection and returns the result.
Request context
Organization ID.
Resource ID.
error
if err := scalekitClient.Connection().DeleteConnection(ctx, "org_123", "conn_456"); err != nil { // handle}GetConnection
Section titled “GetConnection”#asyncGetConnection
Runs GetConnection and returns the result.
Request context
Organization ID.
Resource ID.
The response payload for this operation.
conn, err := scalekitClient.Connection().GetConnection(ctx, "org_123", "conn_123")if err != nil { // handle}_ = conn.ConnectionListConnectionsByDomain
Section titled “ListConnectionsByDomain”#asyncListConnectionsByDomain
Runs ListConnectionsByDomain and returns the result.
Request context
Domain name.
Paginated connections.
conns, err := scalekitClient.Connection().ListConnectionsByDomain(ctx, "acme.com")if err != nil { // handle}_ = conns.ConnectionsListConnections
Section titled “ListConnections”#asyncListConnections
Runs ListConnections and returns the result.
Request context
Organization ID.
Paginated connections.
conns, err := scalekitClient.Connection().ListConnections(ctx, "org_123")if err != nil { // handle}_ = conns.ConnectionsEnableConnection
Section titled “EnableConnection”#asyncEnableConnection
Runs EnableConnection and returns the result.
Request context
Organization ID.
Resource ID.
The updated resource.
resp, err := scalekitClient.Connection().EnableConnection(ctx, "org_123", "conn_123")if err != nil { // handle}_ = resp.EnabledDisableConnection
Section titled “DisableConnection”#asyncDisableConnection
Runs DisableConnection and returns the result.
Request context
Organization ID.
Resource ID.
The updated resource.
resp, err := scalekitClient.Connection().DisableConnection(ctx, "org_123", "conn_123")if err != nil { // handle}_ = resp.Enabled