Creates a SCIM connection and returns a SCIM API key for your users to provide to their IdP.
Arguments
customerId string required
The ID of the customer/organization that the SCIM connection is for
displayName string
A display name for the SCIM connection
scimApiKeyExpiration number
UNIX timestamp when the API key expires (omit for no expiration)
customMapping ScimUserMappingConfig
Custom property mapping for this SCIM connection
Successful Response
connectionId string
The unique identifier for the created SCIM connection
scimApiKey string
The API key to provide to the IdP for SCIM provisioning
Error Types
InvalidFields
One or more fields have invalid values
ScimConnectionForCustomerIdAlreadyExists
A SCIM connection already exists for this customer ID
UnexpectedError
An unexpected error occurred during the operation
const auth = createClient({ url, integrationKey });
const result = await auth.scim.management.createScimConnection({ customerId: "106ce124-1082-4d72-835d-dd1b2172f2fe", displayName: "Example SCIM Connection", scimApiKeyExpiration: 1760232804, customMapping: { userSchema: [ { outputField: "manager", inputPath: "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager", fallbackInputPaths: [ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:managerId" ], propertyType: { dataType: "String" }, displayName: "My Manager", description: "Your manager's name", warnIfMissing: true, defaultValue: "manager@acmeinc.com" } ] }});
if (result.ok) { console.log("SCIM connection created successfully"); console.log(`Connection ID: ${result.data.connectionId}`); console.log(`API Key: ${result.data.scimApiKey}`);} else { console.log(`Error: ${result.error}`); // Check result.error.type to handle specific errors}client = create_client(url=url, integration_key=integration_key)
result = await client.scim.management.create_scim_connection( customer_id="106ce124-1082-4d72-835d-dd1b2172f2fe", display_name="Example SCIM Connection", scim_api_key_expiration=1760232804, custom_mapping=ScimUserMappingConfig( user_schema=[ ScimUserMappingFieldDefinition( output_field="manager", input_path="urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager", fallback_input_paths=[ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:managerId" ], property_type=PropertyTypeString(), display_name="My Manager", description="Your manager's name", warn_if_missing=True, default_value="manager@acmeinc.com" ) ] ))
if is_ok(result): print("SCIM connection created successfully") print(f"Connection ID: {result.data.connection_id}") print(f"API Key: {result.data.scim_api_key}")else: print(f"Error: {result.error.type}") # Check result.error.type to handle specific errorsclient, err := byo.NewClient(url, integrationKey)if err != nil { log.Fatal(err)}
result, err := client.Scim.Management.CreateScimConnection(ctx, byo.CreateScimConnectionCommand{ CustomerID: "106ce124-1082-4d72-835d-dd1b2172f2fe", DisplayName: byo.String("Example SCIM Connection"), ScimAPIKeyExpiration: byo.Int(1760232804), CustomMapping: &byo.ScimUserMappingConfig{ UserSchema: []byo.ScimUserMappingFieldDefinition{ { OutputField: "manager", InputPath: "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager", FallbackInputPaths: []string{"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:managerId"}, PropertyType: &byo.PropertyTypeString{}, DisplayName: "My Manager", Description: byo.String("Your manager's name"), WarnIfMissing: true, }, }, },})if err != nil { log.Fatal(err)}
fmt.Println(result.ScimAPIKey)PropelAuthClient client = PropelAuthClient.create(url, integrationKey);
CreateScimConnectionCommand command = CreateScimConnectionCommand.builder() .customerId("106ce124-1082-4d72-835d-dd1b2172f2fe") .displayName("Example SCIM Connection") .scimApiKeyExpiration(1760232804) .customMapping(ScimUserMappingConfig.builder() .userSchema(Arrays.asList( ScimUserMappingFieldDefinition.builder() .outputField("manager") .inputPath("urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager") .fallbackInputPaths(Arrays.asList( "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:managerId" )) .propertyType(new PropertyType.String()) .displayName("My Manager") .description("Your manager's name") .warnIfMissing(true) .defaultValue(JsonValue.of("manager@acmeinc.com")) .build() )) .build()) .build();
try { CreateScimConnectionResponse response = client.scim.management.createScimConnection(command); System.out.println("SCIM connection created successfully"); System.out.println("Connection ID: " + response.getConnectionId()); System.out.println("API Key: " + response.getScimApiKey());} catch (CreateScimConnectionException.InvalidFields e) { System.out.println("Invalid fields: " + e.getDetails());} catch (CreateScimConnectionException.ScimConnectionForCustomerIdAlreadyExists e) { System.out.println("SCIM connection already exists for this customer");} catch (CreateScimConnectionException e) { System.out.println("Error: " + e.getMessage());}var client = new PropelAuthClient(new PropelAuthOptions { Url = url, IntegrationKey = integrationKey });
var command = new CreateScimConnectionCommand{ CustomerId = "106ce124-1082-4d72-835d-dd1b2172f2fe", DisplayName = "Example SCIM Connection", ScimApiKeyExpiration = 1760232804, CustomMapping = new ScimUserMappingConfig { UserSchema = new List<ScimUserMappingFieldDefinition> { new ScimUserMappingFieldDefinition { OutputField = "manager", InputPath = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager", FallbackInputPaths = new List<string> { "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:managerId" }, PropertyType = new PropertyTypeString(), DisplayName = "My Manager", Description = "Your manager's name", WarnIfMissing = true, DefaultValue = JsonSerializer.SerializeToElement("manager@acmeinc.com") } } }};
try{ var response = await client.Scim.Management.CreateScimConnectionAsync(command); Console.WriteLine("SCIM connection created successfully"); Console.WriteLine($"Connection ID: {response.ConnectionId}"); Console.WriteLine($"API Key: {response.ScimApiKey}");}catch (CreateScimConnectionException.InvalidFields ex){ Console.WriteLine($"Invalid fields: {ex.Details}");}catch (CreateScimConnectionException.ScimConnectionForCustomerIdAlreadyExists){ Console.WriteLine("SCIM connection already exists for this customer");}catch (CreateScimConnectionException ex){ Console.WriteLine($"Error: {ex.Message}");}
Response
{ ok: true, data: { connectionId: "s8vmjNLuieN1feLOya0mf3", scimApiKey: "scim_s8vmjNLuieN1feLOya0mf3_FS5RYqqSeZBj7h5RfGE9V7" }}Result( data=CreateScimConnectionResponse( connection_id="s8vmjNLuieN1feLOya0mf3", scim_api_key="scim_s8vmjNLuieN1feLOya0mf3_FS5RYqqSeZBj7h5RfGE9V7" ))byo.CreateScimConnectionResponse{ ConnectionID: "s8vmjNLuieN1feLOya0mf3", ScimAPIKey: "scim_s8vmjNLuieN1feLOya0mf3_FS5RYqqSeZBj7h5RfGE9V7",}CreateScimConnectionResponse( connectionId="s8vmjNLuieN1feLOya0mf3", scimApiKey="scim_s8vmjNLuieN1feLOya0mf3_FS5RYqqSeZBj7h5RfGE9V7")CreateScimConnectionResponse{ ConnectionId = "s8vmjNLuieN1feLOya0mf3", ScimApiKey = "scim_s8vmjNLuieN1feLOya0mf3_FS5RYqqSeZBj7h5RfGE9V7"}