updateConnection

abstract suspend fun updateConnection(connectionId: String, request: IB2BUpdateExternalConnectionParameters): B2BUpdateExternalConnectionResponse

Updates an existing external SSO connection. Calls the PUT /sdk/v1/b2b/sso/external/{connection_id} endpoint. Requires an active session.

Kotlin:

StytchB2B.sso.external.updateConnection(
connectionId = "ext-conn-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request = B2BUpdateExternalConnectionParameters(
displayName = "Updated External Connection",
),
)

iOS:

let params = B2BUpdateExternalConnectionParameters(displayName: "Updated External Connection")
let response = try await StytchB2B.sso.external.updateConnection(
connectionId: "ext-conn-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request: params
)

React Native:

StytchB2B.sso.external.updateConnection(
"ext-conn-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
{ displayName: "Updated External Connection" },
)

Return

B2BUpdateExternalConnectionResponse containing the updated connection.

Parameters

connectionId

The ID of the external SSO connection to update.

request
  • IB2BUpdateExternalConnectionParameters

  • displayName — Human-readable label for the connection.

  • externalConnectionImplicitRoleAssignments? — Roles assigned to all members via this connection.

  • externalGroupImplicitRoleAssignments? — Roles assigned based on group membership.

Throws

StytchError

if the connection is not found or the request fails.

if the coroutine is cancelled.