Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

A provisioning request is rejected with a scimType

After a vendor update, an HR connector's provisioning calls start failing with 400 Bad Request, and its team is sure the SCIM server is broken. This lesson reads each SCIM error body for the rule its request broke, invalidFilter, invalidPath, mutability and noTarget, fixes the requests rather than the server, and paces a replay that meets 429.

A connector starts getting 400s

The printing company keeps its staff accounts in the photo service's business directory, and an HR connector keeps that directory current. When HR records a new hire, the connector creates the account. When someone changes department or leaves, it updates or deactivates them. It has done this quietly for months, through the photo service's SCIM endpoint at https://api.photos.example/scim/v2.

On Monday morning the connector's dashboard turns red, and a message from the team that runs it lands in your queue: "Since this morning a lot of our provisioning calls get 400 Bad Request. The SCIM server is broken. Nothing changed on our side except the vendor's 4.2 update, which went out over the weekend."

You run the SCIM server, so you start with its request log rather than the dashboard:

2026-10-19T08:02:11Z  GET    /scim/v2/Users?filter=...         400  stage=filter    client=hr-connector  request_id=c41e07d2
2026-10-19T08:02:12Z  POST   /scim/v2/Users                    201  stage=complete  client=hr-connector  request_id=8a5f3b10
2026-10-19T08:02:14Z  PATCH  /scim/v2/Users/2b7e91c4-55d0      400  stage=patch     client=hr-connector  request_id=f09d6e21
2026-10-19T08:02:14Z  PATCH  /scim/v2/Users/6c03aa1f-9e12      200  stage=complete  client=hr-connector  request_id=1d77c5e8
2026-10-19T08:02:15Z  PATCH  /scim/v2/Users/9f41d2b8-0c37      400  stage=patch     client=hr-connector  request_id=b3e2a940

The pattern matters before any single line does. Creates succeed. Some searches and some updates fail, and others go through. A server that was broken would fail everything, or fail at random across every kind of request. Failures that follow the shape of the request point at the requests. The connector authenticated each time, and the server stopped each failing request at a parsing or validation stage, well before it tried to write anything.

Read the error body

A 400 status says that the server refused the request because of something in it, and nothing more. SCIM says much more, in the body. RFC 7644, the SCIM protocol, defines an error response with its own schema. Here is the full response to the first failing search:

HTTP/1.1 400 Bad Request
Content-Type: application/scim+json
X-Request-ID: c41e07d2

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "scimType": "invalidFilter",
  "detail": "Filter could not be parsed at position 12: expected a quoted string value."
}

Each field has a job. schemas marks the body as a SCIM error. status repeats the HTTP status, and it is a JSON string, not a number, which trips up connectors that compare it with 400. scimType is a keyword from a fixed list in the specification that names which rule the request broke. detail is free text for a human reader. Code should branch on scimType, never on the wording of detail, which can change between server versions.

Many connectors log only "SCIM error 400" and throw the body away, which is how a team ends up certain the server is broken. Ask them for the body, or find it yourself in the server's record of the request by its ID. Two other SCIM errors you may meet in the same logs, 409 with uniqueness and 412 for a stale version, are about which record a write targets and whether it is current. They belong to Restoring provisioning delivery. The ones below are about the shape of the request itself.

Filters and paths

Before it updates someone, the connector looks them up by user name. In the SCIM filter language a string value is a JSON string, so it goes in double quotes: userName eq "[email protected]". Version 4.2 builds the filter without them. On the wire the filter is URL-encoded, so the change is easy to miss:

GET /scim/v2/Users?filter=userName%20eq%20keiko%40printer.example HTTP/1.1
Host: api.photos.example
Authorization: Bearer <redacted>
Accept: application/scim+json

HTTP/1.1 400 Bad Request
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "scimType": "invalidFilter",
  "detail": "Filter could not be parsed at position 12: expected a quoted string value."
}

Decoded, the filter is userName eq [email protected], and position 12 is where the server expected a quote. The same invalidFilter keyword also covers a filter that parses but asks for something the server does not support, such as emails.value ew "@printer.example" on a server that does not offer "ends with" on that attribute. Either way, the server refused to guess. That is better than the alternative: a server that ignored a filter it did not understand and returned every user would invite a connector to update whoever came first.

Keep a search that matches nobody separate from one that fails. A valid filter with no match returns 200 with "totalResults": 0. That is an answer, not an error, and a connector that treats it as "create a new account" when the lookup was really broken is how duplicates appear.

The second failing pattern is a PATCH. Version 4.2 started sending department changes in the enterprise extension, and it writes the attribute path with a dot:

PATCH /scim/v2/Users/2b7e91c4-55d0 HTTP/1.1
Host: api.photos.example
Authorization: Bearer <redacted>
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    {
      "op": "replace",
      "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.department",
      "value": "Print Operations"
    }
  ]
}

HTTP/1.1 400 Bad Request
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "scimType": "invalidPath",
  "detail": "Path does not name an attribute of this resource."
}

A path into an extension is the schema URN, then a colon, then the attribute name: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department. With a dot, the whole string reads as one unknown name. RFC 7644 defines invalidPath as a path that is invalid or malformed, and servers also commonly use it for a path that names an attribute their schema does not define. When you are unsure whether the server stores an attribute at all, ask it: GET /scim/v2/Schemas lists every attribute it knows, with its type and mutability.

Attributes the client may not change

The third pattern comes from a new 4.2 feature: the connector now syncs team membership, and it does so by adding groups to the user.

PATCH /scim/v2/Users/9f41d2b8-0c37 HTTP/1.1
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    { "op": "add", "path": "groups", "value": [{ "value": "e5a0c7d3-print-ops" }] }
  ]
}

HTTP/1.1 400 Bad Request
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "scimType": "mutability",
  "detail": "Attribute 'groups' is readOnly. Change membership through the Group resource."
}

Every SCIM attribute has a mutability. A readWrite attribute such as title can be changed at any time. An immutable attribute can be set once and then never changed. A readOnly attribute is managed by the server and never written by clients. On a User, id, meta and groups are all read-only. groups is there so you can see a user's memberships, but membership lives on the Group, in its members attribute. The repair is to send that change to the group:

PATCH /scim/v2/Groups/e5a0c7d3-print-ops HTTP/1.1
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    { "op": "add", "path": "members", "value": [{ "value": "9f41d2b8-0c37" }] }
  ]
}

HTTP/1.1 204 No Content

Not every server answers a read-only write with an error. For a PUT, which replaces the whole resource, RFC 7644 tells the server to ignore read-only values the client sends, and some servers apply the same leniency to PATCH. Against one of those, version 4.2 would have received 200 while no membership changed, and nobody would have noticed until someone could not reach a team album. A success status from a write does not prove every field was stored. When the server returns the resource, compare it with what you sent.

Operations that match nothing

The last 400 pattern shows up only for some users. Version 4.2 updates work email addresses with a filtered path:

PATCH /scim/v2/Users/3d58f0e6-a1b4 HTTP/1.1
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    { "op": "replace", "path": "emails[type eq \"work\"].value", "value": "[email protected]" }
  ]
}

HTTP/1.1 400 Bad Request
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "scimType": "noTarget",
  "detail": "No value of 'emails' matches the filter type eq \"work\"."
}

The part in square brackets is a value filter: it selects which entries of the multi-valued emails attribute the operation applies to. Jonah's account was created by an older import that stored only a home address, so nothing matches. RFC 7644 is explicit about this: a replace whose value filter matches no record must fail with noTarget. Notice the contrast with a simple attribute. A replace on a plain attribute that does not exist yet, such as title, is treated as an add. Only a filtered selection that finds nothing is refused.

The repair is to add the value when it is absent:

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    { "op": "add", "path": "emails", "value": [{ "type": "work", "value": "[email protected]" }] }
  ]
}

A remove with a filter that matches nothing is the murky one. The specification does not settle it, so some servers return success because the value is already gone and others return noTarget. A connector that runs against more than one server should read the user first and decide which operation fits, rather than depending on either behavior.

Slowing down for 429

Once the connector team ships a fix, the connector replays the three thousand changes that failed since the weekend, all at once. A different error appears:

HTTP/1.1 429 Too Many Requests
Content-Type: application/scim+json
Retry-After: 30

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "429",
  "detail": "Request rate limit for this client exceeded."
}

This one has no scimType, because it says nothing about the request's content. The status comes from HTTP, not from SCIM. The request was refused and not processed, so it is safe to send again, but not yet. Retry-After gives the wait, either as a number of seconds, as here, or as a date. Honor it. A connector that retries immediately in a loop keeps the limit tripped and can push its own window further out.

Waiting is half the repair. If twenty workers all paused for exactly thirty seconds, they would all return in the same second and hit the limit again, so each should add a random delay, called jitter, and back off further if the 429 repeats. Then find out which limit applies, from the server's documentation or its operator: a request rate per client, a cap on concurrent requests, or a daily quota each call for a different fix. Here it was the per-client rate, and the backlog cleared within the hour once the connector paced itself. A request that timed out is a different matter: it may have been applied, so read the record before sending it again.

Worked example: what changed in version 4.2

The note you send back to the connector team maps each failing request to what the server said and what the connector should send instead. None of it needed a change on the server.

Version 4.2's requests in order. Each 400 named the rule its request broke, the corrected requests succeeded, and the 429 asked the replay to slow down.
Failed provisioning requests after the connector update, by scimType
Request from 4.2ResponseCauseWhat to send instead
User lookup, filter=userName eq [email protected]400 invalidFilterString value not quoteduserName eq "[email protected]", URL-encoded
PATCH ...enterprise:2.0:User.department400 invalidPathDot instead of colon after the schema URN...enterprise:2.0:User:department
PATCH add to the user's groups400 mutabilitygroups is read-only on a UserPATCH add to the Group's members
PATCH replace on emails[type eq "work"].value400 noTargetUser has no work email to replaceadd to emails with type work
Backlog replay, all at once429, Retry-After: 30Per-client request rate exceededWait as told, add jitter, pace the replay

To verify, replay one failed request of each kind with the corrected shape and read each user back: Keiko is found, the department is stored, the new member appears on the group and in that user's own groups, and Jonah has a work email. Then send one request that must still be refused: a PATCH that tries to replace a user's id still returns 400 with mutability. The connector works again, and the server's rules are exactly as strict as they were on Friday.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

A connector sends a PATCH with {"op":"replace","path":"phoneNumbers[type eq \"mobile\"].value","value":"+1 555 0100"} for a user who has only a work phone. The server answers 400 with scimType noTarget. What should the connector change? 1 of 3

Choose one answer.

After a connector fix, its 16 workers replay a backlog and the SCIM server answers many requests with HTTP/1.1 429 Too Many Requests and Retry-After: 45. What should the connector do? 2 of 3

Choose one answer.

To sync team membership, a connector sends a PATCH that adds a group to a user's groups attribute and gets 400 with scimType mutability. What should it send instead? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity