RocketChat/Rocket.Chat · error · Error
SAML Profile did not contain an email address
Error message
SAML Profile did not contain an email address
What it means
Error "SAML Profile did not contain an email address" thrown in RocketChat/Rocket.Chat.
Source
Thrown at apps/meteor/server/lib/saml/lib/Utils.ts:480
throw new Error(`SAML Profile did not have the expected identifier (${userDataMap.identifier.attribute}).`);
}
}
const attributeList = new Map();
for (const attributeName of userDataMap.attributeList) {
if (profile[attributeName] === undefined) {
this.log({ msg: 'SAML user profile is missing the attribute.', attribute: attributeName });
continue;
}
attributeList.set(attributeName, profile[attributeName]);
}
const email = this.getProfileValue(profile, userDataMap.email);
const profileUsername = this.getProfileValue(profile, userDataMap.username, true);
const name = this.getProfileValue(profile, userDataMap.name, true);
// Even if we're not using the email to identify the user, it is still mandatory because it's a mandatory information on Rocket.Chat
if (!email) {
throw new Error('SAML Profile did not contain an email address');
}
const userObject: ISAMLUser = {
samlLogin: {
provider: this.relayState,
idp: profile.issuer,
idpSession: profile.sessionIndex,
nameID: profile.nameID,
},
emailList: ensureArray<string>(email),
fullName: name || profile.displayName || profile.username,
eppn: profile.eppn,
attributeList,
identifier: userDataMap.identifier,
};
if (profileUsername) {
userObject.username = this.normalizeUsername(profileUsername);View on GitHub (pinned to 2a7de45707)
Solutions
- Configure the IdP to include an email attribute in the SAML assertion, or map the email field to an attribute the IdP sends.
When it happens
Trigger: Thrown when the SAML profile contains no email address and no email override can be derived.
Common situations: See trigger scenarios.
AI-assisted analysis of RocketChat/Rocket.Chat@2a7de45707 (2026-08-18).
Data as JSON: /api/errors/46963164106fdd4f.
Report an issue: GitHub.