{"record":{"id":"2edca6987d84c6c7","repo":"RocketChat/Rocket.Chat","slug":"saml-user-map-invalid-configuration-for-spfield","errorCode":null,"errorMessage":"SAML User Map: Invalid configuration for ${spFieldName} field.","messagePattern":"SAML User Map: Invalid configuration for (.+?) field\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/saml/lib/Utils.ts","lineNumber":297,"sourceCode":"\t\t\t},\n\t\t\tname: {\n\t\t\t\tfieldName: 'cn',\n\t\t\t},\n\t\t\tidentifier: {\n\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;","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/2a7de457074cbb4d4373fbd9a4e5bea292c9c764/apps/meteor/server/lib/saml/lib/Utils.ts#L279-L315","documentation":"Error \"SAML User Map: Invalid configuration for ${spFieldName} field.\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown when a SAML user map entry for a service provider field has an invalid or incomplete configuration.","commonSituations":"See trigger scenarios.","solutions":["Correct the SAML user data map entry for the field; each entry must define a valid attribute, plus an optional regex or template."],"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"}