RocketChat/Rocket.Chat · error · MeteorError
error-license-user-limit-reached
error-license-user-limit-reached
Error message
error-license-user-limit-reached
What it means
Thrown by validateUserRoles when activating (or newly creating) a non-special-type user beyond the license's activeUsers cap. The check fires only when the user is active AND either they were previously inactive, or a special type (app/bot) was removed. MeteorError code 'error-license-user-limit-reached' (message i18n-translated).
Source
Thrown at apps/meteor/ee/server/lib/authorization/validateUserRoles.ts:50
if (isGuest) {
return;
}
const isActive = Boolean(userData.active !== false);
const wasActive = currentUserData && currentUserData?.active !== false;
const hasRemovedSpecialType = (wasApp && !isApp) || (wasBot && !isBot);
if (!isActive) {
return;
}
if (!hasRemovedSpecialType && wasActive) {
return;
}
if (await License.shouldPreventAction('activeUsers')) {
throw new MeteorError('error-license-user-limit-reached', i18n.t('error-license-user-limit-reached'));
}
}
View on GitHub (pinned to f9d3ec372b)
Solutions
- Deactivate another active user to free a seat, then retry the activation.
- Upgrade the license to raise the activeUsers cap.
- Leave the user inactive, or mark them as app/bot if appropriate (special types are exempt).
- Audit the active user count vs. licensed seats before provisioning new users.
Example fix
// before: activate past the cap
await Users.updateOne({ _id }, { $set: { active: true } });
await validateUserRoles({ active: true }, { active: false });
// after: check headroom
if (await License.shouldPreventAction('activeUsers')) {
throw new Error('No active seats available — deactivate a user or upgrade');
} Defensive patterns
Strategy: validation
Validate before calling
async function canActivateUser(): Promise<boolean> {
return !(await License.shouldPreventAction('activeUsers'));
} Type guard
const willActivate = (next: Partial<IUser>, prev?: Partial<IUser>): boolean => next.active !== false && !(prev && prev.active !== false);
Try / catch
try { await validateUserRoles({ active: true }, { active: false }); } catch (e) {
if (e?.error === 'error-license-user-limit-reached') { /* deactivate another user or upgrade */ } else throw e;
} Prevention
- Monitor active-user count vs. licensed seats.
- Prefer deactivating inactive users before provisioning new ones.
- Use app/bot special types where appropriate — they are exempt.
When it happens
Trigger: Activating a previously inactive user, removing an app/bot type from a user (so they now count as a regular active user), or creating a new active user when the active-user seat count is already at the license limit.
Common situations: License was downgraded (fewer seats) while the user base stayed the same and now an admin tries to activate another user; bulk re-activation of disabled accounts; license trial expired.
Related errors
- error-max-guests-number-reached
- error-license-user-limit-reached
- error-action-not-allowed
- error-action-not-allowed
- error-action-not-allowed
AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12).
Data as JSON: /api/errors/e5db9c0fb6a86f17.
Report an issue: GitHub.