passbolt/passbolt_api · error · Passbolt\Scim\Exception\NotSupportedException
The PATCH operation is not supported
Error message
The PATCH operation is not supported
What it means
This NotSupportedException is thrown at the start of patch() when the ServiceProviderConfig reports that PATCH is not supported. It is a capability guard: the server advertises its supported operations and refuses PATCH if the config disables it.
Solutions
- Enable PATCH support in the SCIM ServiceProviderConfig (or update the Scim plugin to a version supporting it)
- Configure the IdP to use PUT (full replace) if PATCH must remain disabled
- Check the /scim/v2/ServiceProviderConfig endpoint to see the advertised capabilities
Defensive patterns
Strategy: fallback
Validate before calling
$config = $http->get('/scim/v2/ServiceProviderConfig')->getJson();
if (!($config['patch']['supported'] ?? false)) {
// fall back to PUT full-replace sync
} Try / catch
try {
$scimUsers->patch($id, $patchRequest);
} catch (\Passbolt\Scim\Exception\NotSupportedException $e) {
// capability not advertised: switch strategy to PUT or full re-create
} Prevention
- Query ServiceProviderConfig at sync startup and cache advertised capabilities
- Configure the IdP to match the server's advertised operations
- Keep the Scim plugin updated so PATCH remains supported
When it happens
Trigger: PATCH /scim/v2/Users/{id} while ServiceProviderConfig::isPatchSupported() returns false — i.e. patch support is disabled in the service provider configuration.
Common situations: SCIM plugin configuration with patch disabled, an IdP configured to sync via PATCH while the server advertises only PUT, or an outdated plugin version where patch support is not yet enabled.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- The operation type ` ` is not supported or invalid
- Invalid data to create a SCIM Operation
- Invalid data to create a SCIM PATCH REQUEST
- Invalid Resource type
- Invalid schema for SCIM PATCH REQUEST
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/528b53abb74c594f.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/PassboltEe/Scim/src/Utility/Resource/UserScimResource.php:536
$mutability = ScimConstants::ATTRIBUTE_MUTABILITY_READ_WRITE;
}
if (!ScimConstants::isValidAttributeMutability((string)$mutability)) {
throw new ScimException(sprintf('The mutability `%s` is invalid or not supported', $mutability));
}
return $mutability;
}
/**
* {@inheritDoc}
*
* @throws \Exception
*/
public function patch(PatchRequest $patchRequest): static
{
$serviceConfig = new ServiceProviderConfig();
if (!$serviceConfig->isPatchSupported()) {
throw new NotSupportedException('The PATCH operation is not supported');
}
if (!$this->userEntity) {
throw new ScimException('The database user must be set to apply an operation');
}
$userPatchData = [];
$scimEntryPatchData = [];
foreach ($patchRequest->getOperations() as $operation) {
if ($operation->getAttribute() === null) {
$attributes = $operation->getValue();
} else {
$attributes[$operation->getAttribute()] = $operation->getValue();
}
foreach ($attributes as $attributeName => $attributeValue) {
$mutability = $this->getAttributeMutability($attributeName);
if ($mutability === ScimConstants::ATTRIBUTE_MUTABILITY_READ_ONLY) {
throw new BadRequestException(sprintf(
'Unable to apply operation `%s` for the attribute `%s` with mutability `%s`',View on GitHub (pinned to 31c1bbc10f)