CreateSSOConfiguration
client.organizations.ssoConfigurations.create(SSOConfigurationCreateParams { clientId, clientSecret, issuerUrl, 6 more } body, RequestOptionsoptions?): SSOConfigurationCreateResponse { ssoConfiguration }
POST/gitpod.v1.OrganizationService/CreateSSOConfiguration
Creates or updates SSO configuration for organizational authentication.
Use this method to:
- Configure OIDC-based SSO providers
- Set up built-in providers (Google, GitHub, etc.)
- Define custom identity providers
- Manage authentication policies
Examples
-
Configure built-in Google SSO:
Sets up SSO using Google Workspace.
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" clientId: "012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com" clientSecret: "GOCSPX-abcdefghijklmnopqrstuvwxyz123456" issuerUrl: "https://accounts.google.com" emailDomain: "acme-corp.com" -
Configure custom OIDC provider:
Sets up SSO with a custom identity provider.
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" clientId: "acme-corp-gitpod" clientSecret: "secret-token-value" issuerUrl: "https://sso.acme-corp.com" emailDomain: "acme-corp.com"
CreateSSOConfiguration
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const ssoConfiguration = await client.organizations.ssoConfigurations.create({
clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com',
clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456',
issuerUrl: 'https://accounts.google.com',
organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047',
emailDomain: 'acme-corp.com',
});
console.log(ssoConfiguration.ssoConfiguration);{
"ssoConfiguration": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"issuerUrl": "issuerUrl",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"providerType": "PROVIDER_TYPE_UNSPECIFIED",
"state": "SSO_CONFIGURATION_STATE_UNSPECIFIED",
"additionalScopes": [
"string"
],
"claims": {
"foo": "string"
},
"claimsExpression": "claimsExpression",
"clientId": "clientId",
"displayName": "displayName",
"emailDomain": "emailDomain",
"emailDomains": [
"sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB"
]
}
}Returns Examples
{
"ssoConfiguration": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"issuerUrl": "issuerUrl",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"providerType": "PROVIDER_TYPE_UNSPECIFIED",
"state": "SSO_CONFIGURATION_STATE_UNSPECIFIED",
"additionalScopes": [
"string"
],
"claims": {
"foo": "string"
},
"claimsExpression": "claimsExpression",
"clientId": "clientId",
"displayName": "displayName",
"emailDomain": "emailDomain",
"emailDomains": [
"sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB"
]
}
}