SCIM Management Reference | PropelAuth BYO Documentation

SCIM Management Reference

Create SCIM Connection

Creates a SCIM connection and returns a SCIM API key for your users to provide to their IdP.

Arguments

Successful Response

Error Types

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}`);
}

Fetch SCIM Connection

Retrieves SCIM connection details by connection ID or customer ID.

Arguments

Successful Response

Error Types

const auth = createClient({ url, integrationKey });

const result = await auth.scim.management.fetchScimConnection({
  scimConnectionId: "s8vmjNLuieN1feLOya0mf3"
});

if (result.ok) {
  console.log("SCIM connection fetched successfully");
  console.log(`Connection ID: ${result.data.connectionId}`);
  console.log(`Customer ID: ${result.data.customerId}`);
  console.log(`Display Name: ${result.data.displayName}`);
} else {
  console.log(`Error: ${result.error}`);
}

Patch SCIM Connection

Updates an existing SCIM connection configuration.

Arguments

Successful Response

Returns an empty response on success

Error Types

const auth = createClient({ url, integrationKey });

const result = await auth.scim.management.patchScimConnection({
  scimConnectionId: "s8vmjNLuieN1feLOya0mf3",
  displayName: "Updated 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 updated successfully");
} else {
  console.log(`Error: ${result.error}`);
}

Reset SCIM Connection API Key

Invalidates a SCIM connection's API key and generates a new one.

Arguments

Successful Response

Error Types

const auth = createClient({ url, integrationKey });

const result = await auth.scim.management.resetScimApiKey({
  scimConnectionId: "s8vmjNLuieN1feLOya0mf3",
  scimApiKeyExpiration: 1760232804
});

if (result.ok) {
  console.log("SCIM API key reset successfully");
  console.log(`New API Key: ${result.data.scimApiKey}`);
} else {
  console.log(`Error: ${result.error}`);
}

Get SCIM Connection Users

Fetches user accounts that belong to the provided SCIM connection.

Arguments

Successful Response

Error Types

const auth = createClient({ url, integrationKey });

const result = await auth.scim.management.getScimUsers({
  scimConnectionId: "s8vmjNLuieN1feLOya0mf3",
  filter: { primaryEmail: "example@propelauth.com" },
  pageNumber: 0,
  pageSize: 100
});

if (result.ok) {
  console.log("SCIM users fetched successfully");
  console.log(`Found ${result.data.totalResults} users`);
  result.data.users.forEach(user => {
    console.log(`User: ${user.primaryEmail}`);
  });
} else {
  console.log(`Error: ${result.error}`);
}

Delete SCIM Connection

Deletes a SCIM connection permanently.

Arguments

Successful Response

Returns an empty response on success

Error Types

const auth = createClient({ url, integrationKey });

const result = await auth.scim.management.deleteScimConnection({
  scimConnectionId: "s8vmjNLuieN1feLOya0mf3"
});

if (result.ok) {
  console.log("SCIM connection deleted successfully");
} else {
  console.log(`Error: ${result.error}`);
}

SCIM Config

The 'scim_config.jsonc' file allows you to set a default SCIM mapping configuration. This can be used to map properties (name, address, etc.) from your user's SCIM providers to your application.

Arguments

{
  "userSchema": [
    {
      "outputField": "familyName",
      "inputPath": "name.familyName",
      "fallbackInputPaths": ["lastName", "last_name"],
      "propertyType": {"dataType": "String"},
      "displayName": "Family Name",
      "description": "The user's family name.",
      "warnIfMissing": true,
      "defaultValue": "Unknown"
    },
    {
      "outputField": "givenName",
      "inputPath": "name.givenName",
      "displayName": "Preferred Name",
      "propertyType": {"dataType": "String"}
    },
    {
      "outputField": "phoneNumbers",
      "inputPath": "phoneNumbers[type eq \"work\"].value",
      "displayName": "Work Phone Numbers",
      "propertyType": {"dataType": "List", "itemType": {"dataType": "String"}}
    },
    {
      "outputField": "department",
      "inputPath": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department",
      "displayName": "Department",
      "propertyType": {"dataType": "Enum", "options": ["Engineering", "Sales", "Marketing", "Human Resources", "Finance", "Customer Support", "Legal", "Operations"]}
    },
    {
      "outputField": "manager",
      "inputPath": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager",
      "displayName": "My Manager",
      "propertyType": {"dataType": "String"}
    }
  ]
}