Skip to content
Docs
SSO Connection

Update

Update

client.Organizations.SSOConnection.Update(ctx, organizationID, params) (*SSOConnection, error)
PATCH/organizations/{organization_id}/sso-connection

Update SSO connection configuration

ParametersExpand Collapse
organizationID string

Organization ID or label identifier

minLength1
maxLength255
params OrganizationSSOConnectionUpdateParams
ClientID param.Field[string]optional

Body param: OAuth 2.0 client ID (set to null to remove)

ClientSecret param.Field[string]optional

Body param: OAuth 2.0 client secret (set to null to remove)

Identifier param.Field[string]optional

Body param: SSO provider identifier (e.g., issuer URL)

minLength1
maxLength2048
Protocols param.Field[OrganizationSSOConnectionUpdateParamsProtocols]optional

Body param: Protocol configuration for an SSO connection update. Omit a protocol to leave it unchanged.

Oauth2 OrganizationSSOConnectionUpdateParamsProtocolsOauth2optional

OAuth 2.0 protocol configuration for an SSO connection update. Each field is tri-state, omit to leave unchanged, send null to clear, send a value to set.

AuthorizationEndpoint stringoptional

OAuth 2.0 authorization endpoint. Set to null to clear.

formaturi
AuthorizationParameters map[string, string]optional

Custom query parameters appended to authorization redirect URLs. Use for non-standard providers (e.g. Google prompt=consent, access_type=offline). Set to null to clear.

CodeChallengeMethodsSupported []stringoptional

Supported PKCE code challenge methods. Set to null to clear.

JwksUri stringoptional

JSON Web Key Set endpoint. Set to null to clear.

formaturi
RegistrationEndpoint stringoptional

OAuth 2.0 registration endpoint. Set to null to clear.

formaturi
ScopesSupported []stringoptional

Supported OAuth 2.0 scopes. Set to null to clear.

TokenEndpoint stringoptional

OAuth 2.0 token endpoint. Set to null to clear.

formaturi
Openid OrganizationSSOConnectionUpdateParamsProtocolsOpenidoptional

OpenID Connect protocol configuration for an SSO connection update. Each field is tri-state, omit to leave unchanged, send null to clear, send a value to set.

Scopes []stringoptional

Additional OIDC scopes to request from this provider during authentication (e.g. "groups"). Merged with the default scopes (openid, profile, email). Set to null to clear.

UserIdentifierClaim stringoptional

Name of a top-level string claim in the provider's ID Token to use as the user identifier on user creation. Set to null to clear.

UserinfoEndpoint stringoptional

OpenID Connect UserInfo endpoint. Set to null to clear.

formaturi
XClientRequestID param.Field[string]optional

Header param: Unique request identifier specified by the originating caller and passed along by proxies.

formatuuid
ReturnsExpand Collapse
type SSOConnection struct{…}

SSO connection configuration for an organization

ID string

Unique identifier for the SSO connection

ClientID string

OAuth 2.0 client ID

ClientSecretSet bool

Whether a client secret is configured

CreatedAt Time

The time the entity was created in utc

formatdate-time
Identifier string

SSO provider identifier (e.g., issuer URL)

minLength1
maxLength2048
UpdatedAt Time

The time the entity was mostly recently updated in utc

formatdate-time
Permissions map[string, map[string, bool]]optional

Permissions granted to the authenticated principal for this resource. Only populated when the 'expand[]=permissions' query parameter is provided. Keys are resource types (e.g., "organizations"), values are objects mapping permission names to boolean values indicating if the permission is granted.

Protocols SSOConnectionProtocoloptional

Protocol configuration for SSO connection

Oauth2 SSOConnectionProtocolOauth2optional

OAuth 2.0 protocol configuration for SSO connection

AuthorizationEndpoint stringoptional

OAuth 2.0 authorization endpoint

formaturi
AuthorizationParameters map[string, string]optional

Custom query parameters appended to authorization redirect URLs. Use for non-standard providers (e.g. Google prompt=consent, access_type=offline).

CodeChallengeMethodsSupported []stringoptional

Supported PKCE code challenge methods

JwksUri stringoptional

JSON Web Key Set endpoint

formaturi
RegistrationEndpoint stringoptional

OAuth 2.0 registration endpoint

formaturi
ScopesSupported []stringoptional

Supported OAuth 2.0 scopes

TokenEndpoint stringoptional

OAuth 2.0 token endpoint

formaturi
Openid SSOConnectionProtocolOpenidoptional

OpenID Connect protocol configuration for SSO connection

Scopes []stringoptional

Additional OIDC scopes to request from this provider during authentication (e.g. "groups"). Merged with the default scopes (openid, profile, email).

UserIdentifierClaim stringoptional

Name of a top-level string claim in the provider's ID Token to use as the user identifier on user creation. When not set, the user's Keycard ID is used.

UserinfoEndpoint stringoptional

OpenID Connect UserInfo endpoint

formaturi

Update

package main

import (
  "context"
  "fmt"

  "github.com/keycardai/keycard-go"
  "github.com/keycardai/keycard-go/option"
)

func main() {
  client := keycard.NewClient(
    option.WithAPIKey("My API Key"),
  )
  ssoConnection, err := client.Organizations.SSOConnection.Update(
    context.TODO(),
    "x",
    keycard.OrganizationSSOConnectionUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", ssoConnection.ID)
}
{
  "id": "id",
  "client_id": "client_id",
  "client_secret_set": true,
  "created_at": "2019-12-27T18:11:19.117Z",
  "identifier": "x",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "permissions": {
    "organizations": {
      "read": true,
      "update": true
    },
    "users": {
      "read": true,
      "list": true
    }
  },
  "protocols": {
    "oauth2": {
      "authorization_endpoint": "https://example.com",
      "authorization_parameters": {
        "foo": "string"
      },
      "code_challenge_methods_supported": [
        "string"
      ],
      "jwks_uri": "https://example.com",
      "registration_endpoint": "https://example.com",
      "scopes_supported": [
        "string"
      ],
      "token_endpoint": "https://example.com"
    },
    "openid": {
      "scopes": [
        "string"
      ],
      "user_identifier_claim": "user_identifier_claim",
      "userinfo_endpoint": "https://example.com"
    }
  }
}
Returns Examples
{
  "id": "id",
  "client_id": "client_id",
  "client_secret_set": true,
  "created_at": "2019-12-27T18:11:19.117Z",
  "identifier": "x",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "permissions": {
    "organizations": {
      "read": true,
      "update": true
    },
    "users": {
      "read": true,
      "list": true
    }
  },
  "protocols": {
    "oauth2": {
      "authorization_endpoint": "https://example.com",
      "authorization_parameters": {
        "foo": "string"
      },
      "code_challenge_methods_supported": [
        "string"
      ],
      "jwks_uri": "https://example.com",
      "registration_endpoint": "https://example.com",
      "scopes_supported": [
        "string"
      ],
      "token_endpoint": "https://example.com"
    },
    "openid": {
      "scopes": [
        "string"
      ],
      "user_identifier_claim": "user_identifier_claim",
      "userinfo_endpoint": "https://example.com"
    }
  }
}