RocketChat/Rocket.Chat · error · Error

SAML User Map: Invalid identifier.

Error message

SAML User Map: Invalid identifier.

What it means

Error "SAML User Map: Invalid identifier." thrown in RocketChat/Rocket.Chat.

Source

Thrown at apps/meteor/server/lib/saml/lib/Utils.ts:302

				type: '',
			},
		};

		let identifier = immutableProperty.toLowerCase();

		for (const spFieldName in map) {
			if (!map.hasOwnProperty(spFieldName)) {
				continue;
			}

			const attribute = map[spFieldName];
			if (typeof attribute !== 'string' && typeof attribute !== 'object') {
				throw new Error(`SAML User Map: Invalid configuration for ${spFieldName} field.`);
			}

			if (spFieldName === '__identifier__') {
				if (typeof attribute !== 'string') {
					throw new Error('SAML User Map: Invalid identifier.');
				}

				identifier = attribute;
				continue;
			}

			let attributeMap: IAttributeMapping | null = null;

			// If it's a complex type, let's check what's in it
			if (typeof attribute === 'object') {
				// A fieldName is mandatory for complex fields. If it's missing, let's skip this one.
				if (!attribute.hasOwnProperty('fieldName') && !attribute.hasOwnProperty('fieldNames')) {
					continue;
				}

				const fieldName = attribute.fieldName || attribute.fieldNames;
				const { regex, template } = attribute;

View on GitHub (pinned to 2a7de45707)

Solutions

  1. Set the identifier in the SAML user data map to a valid field name (e.g. 'username' or 'email').

When it happens

Trigger: Thrown when the SAML user map identifier configuration is missing or malformed.

Common situations: See trigger scenarios.


AI-assisted analysis of RocketChat/Rocket.Chat@2a7de45707 (2026-08-18). Data as JSON: /api/errors/5d86ee984617e951. Report an issue: GitHub.