{"record":{"id":"cc3001bb2fa57a13","repo":"Mintplex-Labs/anything-llm","slug":"multi-user-mode-is-not-enabled-it-must-be-enabled","errorCode":null,"errorMessage":"Multi-User mode is not enabled. It must be enabled to use Simple SSO.","messagePattern":"Multi-User mode is not enabled\\. It must be enabled to use Simple SSO\\.","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/utils/middleware/simpleSSOEnabled.js","lineNumber":28,"sourceCode":" */\nasync function simpleSSOEnabled(_, response, next) {\n  if (!(\"SIMPLE_SSO_ENABLED\" in process.env)) {\n    return response\n      .status(403)\n      .send(\n        \"Simple SSO is not enabled. It must be enabled to validate or issue temporary auth tokens.\"\n      );\n  }\n\n  // If the multi-user mode response local is not set, we need to check if it's enabled.\n  if (!(\"multiUserMode\" in response.locals)) {\n    const multiUserMode = await SystemSettings.isMultiUserMode();\n    response.locals.multiUserMode = multiUserMode;\n  }\n\n  if (!response.locals.multiUserMode) {\n    return response\n      .status(403)\n      .send(\n        \"Multi-User mode is not enabled. It must be enabled to use Simple SSO.\"\n      );\n  }\n\n  next();\n}\n\n/**\n * Checks if simple SSO login is disabled by checking if the\n * SIMPLE_SSO_NO_LOGIN environment variable is set as well as\n * SIMPLE_SSO_ENABLED is set.\n *\n * This check should only be run when in multi-user mode when used.\n * @returns {boolean}\n */\nfunction simpleSSOLoginDisabled() {\n  return (","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/middleware/simpleSSOEnabled.js#L10-L46","documentation":"Mode guard in the simpleSSOEnabled middleware: SIMPLE_SSO_ENABLED passed its env check but SystemSettings.isMultiUserMode() returned false, and Simple SSO temporary tokens only make sense in multi-user mode, so the route is refused with 403.","triggerScenarios":"Simple SSO attempted while multi-user mode is disabled. Triggered when SSO flow runs but the instance is in single-user mode (simpleSSOEnabled.js:28).","commonSituations":"See trigger scenarios.","solutions":["Enable Multi-User mode in the instance security settings — Simple SSO requires multi-user mode.","Restart the server after changing the mode so the middleware picks up the setting."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}