n8n-io/n8n · warning

Plan lacks license for this feature

Error message

Plan lacks license for this feature

What it means

Returned as a 403 JSON response by `ControllerRegistry.createLicenseMiddleware` when a route declares `@Licensed(feature)` and `license.isLicensed(feature)` returns false at request time. The body is static: `{ status: 'error', message: 'Plan lacks license for this feature' }`. Unlike error 1327 (thrown at boot), this is per-request and only blocks the gated endpoint.

Source

Thrown at packages/cli/src/controller.registry.ts:229

		}

		if (route.accessScope) {
			middlewares.push(this.createScopedMiddleware(route.accessScope));
		}

		middlewares.push(...controllerMiddlewares);

		if (route.middlewares) {
			middlewares.push(...route.middlewares);
		}

		return middlewares;
	}

	private createLicenseMiddleware(feature: BooleanLicenseFeature): RequestHandler {
		return (_req, res, next) => {
			if (!this.license.isLicensed(feature)) {
				res.status(403).json({ status: 'error', message: 'Plan lacks license for this feature' });
				return;
			}
			next();
		};
	}

	private createScopedMiddleware(accessScope: AccessScope): RequestHandler {
		return async (req, res, next) => {
			if (!isAuthenticatedRequest(req)) throw new UnauthenticatedError();
			if (!req.user) throw new UnauthenticatedError();

			const { scope, globalOnly } = accessScope;

			try {
				if (!(await userHasScopes(req.user, [scope], globalOnly, req.params))) {
					res.status(403).json({
						status: 'error',
						message: RESPONSE_ERROR_MESSAGES.MISSING_SCOPE,

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Activate a license that includes the feature via `N8N_LICENSE_ACTIVATION_KEY`.
  2. Verify with `n8n license:info` that the feature is listed.
  3. If the license should already cover it, ensure `license.autoRenewalEnabled=true` and the instance can reach the license server.
  4. Avoid calling the gated endpoint if you do not have the entitlement.
Defensive patterns

Strategy: try-catch

Validate before calling

if (!await license.isLicensed(feature)) {
  throw new Error(`Plan lacks entitlement for ${feature}; activate a qualifying license.`);
}

Try / catch

try { await api.post('/licensed-endpoint'); } catch (e) { if (e.response?.status === 403 && /license/i.test(e.response.data?.message)) { await activateLicense(); await retry(); } else throw e; }

Prevention

When it happens

Trigger: Calling any `@Licensed` endpoint (e.g. `feat:aiBuilder`, advanced RBAC endpoints, source control) without the corresponding entitlement in the active license.

Common situations: Community/Starter license hitting an Enterprise-only endpoint; trial license expired; license not yet activated on a fresh instance; feature flag enabled but entitlement missing.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/bb2201289e43e2a9. Report an issue: GitHub.