Skip to Content
SWARMIXDocs
Users and sign-in

SCIM API

The SCIM 2.0 endpoint of Swarmix Core: addresses, sign-in, the user and group attributes it reads, filters, bulk requests, limits and errors.

Who can do this:Org admin

Swarmix Core has a SCIM 2.0 endpoint. Your identity provider calls it to create, update and remove your organization's members and to send its groups. This page is for checking what your identity provider sends, or for writing your own provisioning script. To connect an identity provider, see SCIM provisioning.

Address and sign-in

Each organization has its own address, ending in /api/scim/v2/ and the organization's id. Copy it from Tenant URL under SCIM Provisioning in the web dashboard. The paths on this page follow that address.

Send the SCIM token in each request:

Authorization: Bearer scim_<token>
Content-Type: application/json

Swarmix Core reads request bodies sent as application/json and answers in application/scim+json.

AnswerWhen
401 "Missing or invalid Authorization header"The request has no bearer token.
401 "Invalid or expired SCIM token"The token is unknown, revoked or past its expiration date.
403 "Token not authorized for this organization"The token belongs to another organization than the address.

Endpoints

Method and pathWhat it does
GET /ServiceProviderConfigLists what the endpoint supports.
GET /Schemas, GET /ResourceTypesLists the User and Group resources and the enterprise user extension.
POST /UsersCreates a member.
GET /Users, GET /Users/{id}Lists members, or reads one.
PUT /Users/{id}Replaces a member's attributes.
PATCH /Users/{id}Changes some attributes.
DELETE /Users/{id}Deactivates or removes a member, following your Deprovisioning Behavior.
POST /Groups, GET /Groups, GET /Groups/{id}, PUT /Groups/{id}, PATCH /Groups/{id}, DELETE /Groups/{id}The same for groups.
POST /BulkRuns up to 100 operations in one request.

The endpoint doesn't support sorting, ETags or password changes.

Users

Swarmix Core reads these attributes:

AttributeRule
userNameRequired. The person's email, up to 320 characters.
externalIdYour identity provider's id for the person, up to 255 characters.
name.formatted, name.givenName, name.familyNameThe display name. Without them, Swarmix uses the part of the email before @.
emailsUp to 10. Swarmix Core keeps one email for each person: the userName when it creates the member, the first email of a PATCH on emails.
activetrue by default. false deactivates the person.
Enterprise extension: department, division, organization, costCenterPlaces the person in your organization's units and sets a cost-center tag, as set up in People's profiles.

Swarmix Core ignores password. A user it returns has id (the Swarmix id to use in paths), externalId, userName, name.formatted, one work email, active, groups and meta.

Creating a member

POST /Users adds the person as a member of your organization:

  • If a member with the same externalId exists, Swarmix Core returns that member as it is.
  • If no account has the email, Swarmix Core creates one.
  • If an account has the email, Swarmix Core adds it to your organization when your organization has verified the email's domain. Otherwise it answers 409, and you invite the person instead.
  • If your identity provider deactivated the person earlier, Swarmix Core restores the membership.

Changing a member

PATCH /Users/{id} takes 1 to 100 operations (add, replace or remove) on these paths: active, displayName, name, name.formatted, name.givenName, name.familyName, userName, emails, externalId and the enterprise extension. Swarmix Core ignores other paths. A replace without a path and with an object of attributes, as Microsoft Entra ID sends it, works too.

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [{ "op": "replace", "path": "active", "value": false }]
}

An account can belong to several organizations. Swarmix Core changes its email or name only when your organization owns the account: its email domain is one your organization verified, or the person belongs to no other organization. For another account, Swarmix Core keeps the name and refuses a new email with 409.

Deactivating and removing

DELETE /Users/{id} and PATCH with active set to false follow your Deprovisioning Behavior:

  • Deactivate suspends the membership. A later POST /Users or PATCH with active set to true restores it.
  • Full removal removes the person's organization membership, project memberships and groups.

Both end the person's sign-ins when your organization owns the account. Swarmix Core answers 409 while the person is the last admin of your organization or of a project, and asks them to hand over. PUT /Users/{id} with active set to false deactivates the person, whatever your Deprovisioning Behavior says.

Lists and filters

GET /Users and GET /Groups take startIndex (from 1), count (default 100, at most 1000) and filter.

A filter is one expression: an attribute, an operator and a value, such as userName eq "[email protected]". The operators are eq (equals), co (contains) and sw (starts with); co and sw ignore case. Swarmix Core doesn't combine expressions with and or or.

ListAttributes you can filter on
UsersuserName, externalId, id, displayName, active (with eq)
GroupsdisplayName

The user list holds active members only, including people who joined by invitation. A deactivated member doesn't appear, and GET /Users/{id} answers 404 for them.

Groups

A group has a displayName (required), an externalId and up to 10,000 members. Each member's value is a Swarmix user id, and each member must already be an active member of your organization.

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
  "displayName": "Engineering",
  "externalId": "okta-group-eng",
  "members": [{ "value": "<Swarmix user id>" }]
}

A group makes its people members of your organization, and you can build rule groups on it in Groups. It doesn't make anyone an admin or add anyone to a project.

PATCH /Groups/{id} adds, removes or replaces members, removes one member with the path members[value eq "<id>"], and replaces displayName. A second POST /Groups with the same externalId answers 409. Swarmix Core refuses a change that would take away the role of your organization's last admin.

Bulk requests

POST /Bulk takes up to 100 operations and at most 1 MB. Each operation has a method (POST, PUT, PATCH or DELETE), a path such as /Users or /Users/<id>, an optional bulkId and its data.

Swarmix Core runs the operations in order, each on its own: a failed operation doesn't undo the others. Set failOnErrors to stop after that many failures. A path can't refer to a resource created earlier in the same request by its bulkId; use Swarmix ids.

Limits and errors

Each token can make 100 requests a minute. Over that, Swarmix Core answers 429 with a Retry-After header that gives the seconds to wait. A request body can hold at most 1 MB.

Other errors come as SCIM error bodies with status and detail:

StatusMeaning
400The body or the filter isn't valid (scimType invalidValue).
404No user or group with that id in your organization.
409Another account or group already uses the email or externalId (scimType uniqueness), the account belongs to people outside your organization, or the person is a last admin.

Swarmix Core records each change it makes through SCIM in your organization's audit log, with the token that made it.

On this page