Skip to content
Ona Docs

CreateSCIMConfiguration

client.Organizations.ScimConfigurations.New(ctx, body) (*OrganizationScimConfigurationNewResponse, error)
POST/gitpod.v1.OrganizationService/CreateSCIMConfiguration

Creates a new SCIM configuration for automated user provisioning.

Use this method to:

  • Set up SCIM 2.0 provisioning from an identity provider
  • Generate a bearer token for SCIM API authentication
  • Link SCIM provisioning to an existing SSO configuration

Examples

  • Create basic SCIM configuration:

    Creates a SCIM configuration linked to an SSO provider with default 1 year token expiration.

    organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
    ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  • Create SCIM configuration with custom token expiration:

    Creates a SCIM configuration with a 90-day token expiration.

    organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
    ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    tokenExpiresIn: "7776000s"
ParametersExpand Collapse
body OrganizationScimConfigurationNewParams
OrganizationID param.Field[string]

organization_id is the ID of the organization to create the SCIM configuration for

formatuuid
SSOConfigurationID param.Field[string]

sso_configuration_id is the SSO configuration to link (required for user provisioning)

formatuuid
AllowUnverifiedEmailAccountLinking param.Field[bool]Optional

allow_unverified_email_account_linking allows SCIM to link provisioned users to existing accounts when the identity provider does not mark the email address as verified

Name param.Field[string]Optional

name is a human-readable name for the SCIM configuration

maxLength128
TokenExpiresIn param.Field[string]Optional

token_expires_in is the duration until the token expires. Defaults to 1 year. Minimum 1 day, maximum 2 years.

formatregex
ReturnsExpand Collapse
type OrganizationScimConfigurationNewResponse struct{…}
Token string

token is the bearer token for SCIM API authentication. This is only returned once during creation - store it securely.

ScimConfiguration ScimConfiguration

scim_configuration is the created SCIM configuration

ID string

id is the unique identifier of the SCIM configuration

formatuuid
CreatedAt Time

created_at is when the SCIM configuration was created

formatdate-time
OrganizationID string

organization_id is the ID of the organization this SCIM configuration belongs to

formatuuid
TokenExpiresAt Time

token_expires_at is when the current SCIM token expires

formatdate-time
UpdatedAt Time

updated_at is when the SCIM configuration was last updated

formatdate-time
AllowUnverifiedEmailAccountLinking boolOptional

allow_unverified_email_account_linking allows SCIM to link provisioned users to existing accounts when the identity provider does not mark the email address as verified

Enabled boolOptional

enabled indicates if SCIM provisioning is active

Name stringOptional

name is a human-readable name for the SCIM configuration

maxLength128
SSOConfigurationID stringOptional

sso_configuration_id is the linked SSO configuration (optional)

formatuuid
TokenExpiresAt Time

token_expires_at is when the token will expire

formatdate-time

CreateSCIMConfiguration

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  scimConfiguration, err := client.Organizations.ScimConfigurations.New(context.TODO(), gitpod.OrganizationScimConfigurationNewParams{
    OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"),
    SSOConfigurationID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", scimConfiguration.Token)
}
{
  "token": "token",
  "scimConfiguration": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "createdAt": "2019-12-27T18:11:19.117Z",
    "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "tokenExpiresAt": "2019-12-27T18:11:19.117Z",
    "updatedAt": "2019-12-27T18:11:19.117Z",
    "allowUnverifiedEmailAccountLinking": true,
    "enabled": true,
    "name": "name",
    "ssoConfigurationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  },
  "tokenExpiresAt": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "token": "token",
  "scimConfiguration": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "createdAt": "2019-12-27T18:11:19.117Z",
    "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "tokenExpiresAt": "2019-12-27T18:11:19.117Z",
    "updatedAt": "2019-12-27T18:11:19.117Z",
    "allowUnverifiedEmailAccountLinking": true,
    "enabled": true,
    "name": "name",
    "ssoConfigurationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  },
  "tokenExpiresAt": "2019-12-27T18:11:19.117Z"
}