{"record":{"id":"205dee23d09b593f","repo":"passbolt/passbolt_api","slug":"the-resourcetype-s-is-invalid-or-not-supported","errorCode":null,"errorMessage":"The ResourceType `%s` is invalid or not supported","messagePattern":"The ResourceType `(.+?)` is invalid or not supported","errorType":"exception","errorClass":"Cake\\Http\\Exception\\NotFoundException","httpStatus":404,"severity":"error","filePath":"plugins/PassboltEe/Scim/src/Controller/V2/ScimResourceTypesController.php","lineNumber":38,"sourceCode":"use Cake\\Http\\Exception\\NotFoundException;\nuse Exception;\nuse Passbolt\\Scim\\Utility\\Object\\ListResponse;\nuse Passbolt\\Scim\\Utility\\ScimResourceTypes;\n\nclass ScimResourceTypesController extends AbstractScimController\n{\n    /**\n     * /ResourceTypes SCIM Endpoint (Unauthenticated)\n     *\n     * @param string $settingId Org Setting Id\n     * @param string|null $resourceType Resource Type (User, Group)\n     * @return void\n     */\n    public function resourceTypes(string $settingId, ?string $resourceType = null): void\n    {\n        try {\n            if ($resourceType && !ScimResourceTypes::isValid($resourceType)) {\n                throw new NotFoundException(\n                    sprintf('The ResourceType `%s` is invalid or not supported', $resourceType)\n                );\n            }\n\n            if ($resourceType) {\n                $responseData = ScimResourceTypes::build($resourceType);\n            } else {\n                $resourceTypes = ScimResourceTypes::getAll();\n                $responseData = new ListResponse($resourceTypes, totalResults: count($resourceTypes));\n            }\n            $this->processResponse($settingId, $responseData);\n        } catch (Exception $e) {\n            $this->processException($settingId, $e);\n        }\n    }\n}\n","sourceCodeStart":20,"sourceCodeEnd":55,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/Scim/src/Controller/V2/ScimResourceTypesController.php#L20-L55","documentation":"NotFoundException thrown by ScimResourceTypesController::resourceTypes when a specific resourceType is requested but ScimResourceTypes::isValid() does not recognize it. Only SCIM-supported resource types (e.g. User, Group) can be served; unknown ones produce this message.","triggerScenarios":"GET /scim/v2/<settingId>/ResourceTypes/<type> where <type> is misspelled, lowercased unexpectedly, or simply not a resource type supported by this SCIM implementation.","commonSituations":"SCIM client discovery configured with a resource type name from another SCIM provider; case mismatch (e.g. 'user' vs 'User'); requesting custom resource types not implemented in Passbolt's SCIM subset.","solutions":["Request the full resource type list first (omit the trailing segment) and use a name from that response","Match the resource type name exactly, including capitalization, as returned by the discovery endpoint","Remove unsupported resource types from the SCIM client configuration"],"exampleFix":"// before\nGET /scim/v2/<id>/ResourceTypes/user\n// after\nGET /scim/v2/<id>/ResourceTypes/User","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['User', 'Group'];\nif (resourceType && !SUPPORTED.includes(resourceType)) throw new Error(`Unsupported resource type: ${resourceType}`);","typeGuard":null,"tryCatchPattern":"try { await getScimResourceType(settingId, type); } catch (e) { if (e.status === 404) console.warn(`Resource type ${type} not supported, use discovery`); else throw e; }","preventionTips":["Run ResourceTypes discovery (no trailing segment) and cache returned names","Preserve exact capitalization of resource type names","Only configure SCIM clients with resource types this server supports"],"tags":["scim","not-found","resource-types"],"backgroundTag":"invalid-enum-value","analyzedSha":"31c1bbc10f32808a607fa9bd81891e898779c0bc","analyzedAt":"2026-09-17T00:04:38.960Z","contentChangedAt":"2026-09-17T00:04:38.960Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}