RocketChat/Rocket.Chat · error

Creating normal users is currently not supported

Error message

Creating normal users is currently not supported

What it means

The users bridge create path only supports users of type 'bot' or 'app' — Rocket.Chat app users. Any other type falls through the switch to 'Creating normal users is currently not supported', a deliberate restriction: apps must not create human accounts.

Solutions

  1. Set user.type = 'bot' — most apps never need to create users beyond the framework-provided app user.
  2. For real human accounts, use the REST/provisioning API with admin credentials instead of this bridge.
  3. Re-examine whether you need a second bot user at all; often the app's own user suffices.

Example fix

// before
const user: IUser = { ...base, type: 'user' };
await createUser(user, options, appId);

// after
const user: IUser = { ...base, type: 'bot' };
await createUser(user, options, appId);
Defensive patterns

Strategy: type-guard

Type guard

const isBotOrAppUser = (u: IUser): u is IUser & { type: 'bot' | 'app' } =>
  u.type === 'bot' || u.type === 'app';

Prevention

When it happens

Trigger: App passes an IUser with type undefined, 'user', or any value other than 'bot'/'app' to the user-creation bridge.

Common situations: Building user objects by hand and omitting the type field; porting code that assumed arbitrary user creation; pushing converted external users into the bridge.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/41634e6a39eda3ed. Report an issue: GitHub.

Appendix: source

Thrown at apps/meteor/app/apps/server/bridges/users.ts:105

		}

		switch (user.type) {
			case 'bot':
			case 'app':
				if (!(await checkUsernameAvailability(user.username as string))) {
					throw new Error(`The username "${user.username}" is already being used. Rename or remove the user using it to install this App`);
				}

				await Users.insertOne(user);

				if (options?.avatarUrl) {
					await setUserAvatar(user, options.avatarUrl, '', 'local');
				}

				break;

			default:
				throw new Error('Creating normal users is currently not supported');
		}

		void notifyOnUserChangeById({ clientAction: 'inserted', id: user._id });

		return user._id;
	}

	protected async remove(user: IUser & { id: string }, appId: string): Promise<boolean> {
		this.orch.debugLog(`The App's user is being removed: ${appId}`);

		// It's actually not a problem if there is no App user to delete - just means we don't need to do anything more.
		if (!user) {
			return true;
		}

		try {
			await deleteUser(user.id);
		} catch (err) {

View on GitHub (pinned to b2c16d5842)