{"record":{"id":"04b12311d0bab53a","repo":"langgenius/dify","slug":"limit-exceeded","errorCode":"limit_exceeded","errorMessage":"Unable to create account because the licensed seats limit was exceeded","messagePattern":"Unable to create account because the licensed seats limit was exceeded","errorType":"error_code","errorClass":"SeatsLimitExceeded","httpStatus":400,"severity":"error","filePath":"api/controllers/console/auth/email_register.py","lineNumber":215,"sourceCode":"\n    def _create_new_account(\n        self,\n        email: str,\n        password: str,\n        timezone: str | None = None,\n        language: str | None = None,\n    ) -> Account:\n        try:\n            return AccountService.create_account_and_tenant(\n                email=email,\n                name=email,\n                password=password,\n                interface_language=get_valid_language(language),\n                timezone=timezone,\n                session=db.session(),\n            )\n        except SeatsLimitExceededError:\n            raise SeatsLimitExceeded()\n        except AccountRegisterError:\n            raise AccountInFreezeError()\n","sourceCodeStart":197,"sourceCodeEnd":218,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/auth/email_register.py#L197-L218","documentation":"Raised by SeatsLimitExceeded in _create_new_account when AccountService.create_account_and_tenant raises SeatsLimitExceededError. This is a licensing/billing control: the Dify edition enforces a maximum number of seated accounts per tenant/workspace, and new account creation is refused once the cap is hit.","triggerScenarios":"POST /console/api/email-register succeeds through all token checks, then create_account_and_tenant attempts to provision a tenant seat and the configured seat limit is reached.","commonSituations":"Self-hosted EE with a license seat cap exhausted; SaaS workspace on a plan whose seat quota is full; trial license expired or downgraded; orphaned inactive accounts still counting toward the limit.","solutions":["Upgrade the license/plan to raise the seat cap, or remove inactive member accounts to free seats.","Check the billing/license admin page to see current seat usage versus the limit.","If seats should be available, verify the license file/env is current and the seat-count job is not stale.","Invite the user as a member of an existing workspace instead of creating a new account/tenant."],"exampleFix":"// before: every signup creates a new tenant\nregister(...);\n// after: when seats are full, offer invite link\nif (res.code === 'limit_exceeded') showUpgradeOrInviteUI();","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await register({ token, ... });\n} catch (e) {\n  if (e.code === 'limit_exceeded') showUpgradeOrInviteUI();\n  else throw e;\n}","preventionTips":["Monitor seat usage vs license cap before users hit the wall.","Remove inactive members to free seats before onboarding.","Keep the license file/env current; alert when seats approach the cap."],"tags":["auth","registration","licensing","billing","seats"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}