{"record":{"id":"5d86ee984617e951","repo":"RocketChat/Rocket.Chat","slug":"saml-user-map-invalid-identifier","errorCode":null,"errorMessage":"SAML User Map: Invalid identifier.","messagePattern":"SAML User Map: Invalid identifier\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/saml/lib/Utils.ts","lineNumber":302,"sourceCode":"\t\t\t\ttype: '',\n\t\t\t},\n\t\t};\n\n\t\tlet identifier = immutableProperty.toLowerCase();\n\n\t\tfor (const spFieldName in map) {\n\t\t\tif (!map.hasOwnProperty(spFieldName)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst attribute = map[spFieldName];\n\t\t\tif (typeof attribute !== 'string' && typeof attribute !== 'object') {\n\t\t\t\tthrow new Error(`SAML User Map: Invalid configuration for ${spFieldName} field.`);\n\t\t\t}\n\n\t\t\tif (spFieldName === '__identifier__') {\n\t\t\t\tif (typeof attribute !== 'string') {\n\t\t\t\t\tthrow new Error('SAML User Map: Invalid identifier.');\n\t\t\t\t}\n\n\t\t\t\tidentifier = attribute;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet attributeMap: IAttributeMapping | null = null;\n\n\t\t\t// If it's a complex type, let's check what's in it\n\t\t\tif (typeof attribute === 'object') {\n\t\t\t\t// A fieldName is mandatory for complex fields. If it's missing, let's skip this one.\n\t\t\t\tif (!attribute.hasOwnProperty('fieldName') && !attribute.hasOwnProperty('fieldNames')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst fieldName = attribute.fieldName || attribute.fieldNames;\n\t\t\t\tconst { regex, template } = attribute;\n","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/2a7de457074cbb4d4373fbd9a4e5bea292c9c764/apps/meteor/server/lib/saml/lib/Utils.ts#L284-L320","documentation":"Error \"SAML User Map: Invalid identifier.\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown when the SAML user map identifier configuration is missing or malformed.","commonSituations":"See trigger scenarios.","solutions":["Set the identifier in the SAML user data map to a valid field name (e.g. 'username' or 'email')."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2a7de457074cbb4d4373fbd9a4e5bea292c9c764","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}