{"record":{"id":"10599d85ee6ceb14","repo":"RocketChat/Rocket.Chat","slug":"adding-saml-service-is-deprecated","errorCode":null,"errorMessage":"Adding SAML service is deprecated","messagePattern":"Adding SAML service is deprecated","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/saml/lib/settings.ts","lineNumber":166,"sourceCode":"\t\t\t\t}\n\n\t\t\t\tconst service = await LoginServiceConfiguration.removeByService(serviceName);\n\t\t\t\tif (!service) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvoid notifyOnLoginServiceConfigurationChanged({ _id: service._id }, 'removed');\n\n\t\t\t\treturn false;\n\t\t\t}),\n\t\t)\n\t).filter((e) => e) as IServiceProviderOptions[];\n\n\tSAMLUtils.setServiceProvidersList(providers);\n};\n\nexport const addSamlService = function (name: string): void {\n\tSystemLogger.warn({\n\t\tmsg: 'Adding SAML service is deprecated',\n\t\tserviceName: name,\n\t});\n};\n\nexport const addSettings = async function (name: string): Promise<void> {\n\tawait settingsRegistry.addGroup('SAML', async function () {\n\t\tawait this.with(\n\t\t\t{\n\t\t\t\ttab: 'SAML_Connection',\n\t\t\t},\n\t\t\tasync function () {\n\t\t\t\tawait this.add(`SAML_Custom_${name}`, false, {\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\ti18nLabel: 'Accounts_OAuth_Custom_Enable',\n\t\t\t\t\tpublic: true,\n\t\t\t\t\talert: 'Premium_required_from_9_0_0_alert',\n\t\t\t\t});","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/saml/lib/settings.ts#L148-L184","documentation":"This is a deprecation warning emitted by the 'addSamlService' Meteor method in Rocket.Chat. The method body was gutted: it now only logs SystemLogger.warn({msg: 'Adding SAML service is deprecated', serviceName}) and performs no configuration. SAML service providers are instead derived from the SAML_Custom-* settings in the settings registry (see buildSettings/setServiceProvidersList in the same file). The call remains only so old clients/apps calling the method do not crash, while telling the operator the code path is dead.","triggerScenarios":"A client (legacy admin UI, old fork, custom script, or Apps Engine code) invokes Meteor.call('addSamlService', name) on apps/meteor. The method is still registered in apps/meteor/server/meteor-methods/auth/addSamlService.ts, so any such call lands in the stub at apps/meteor/server/lib/saml/lib/settings.ts:165 and logs the warning while doing nothing.","commonSituations":"Upgrading a Rocket.Chat deployment that has custom client code or third-party integrations still calling addSamlService; porting an old SAML setup script written for pre-refactor versions where this method actually created the SAML provider; running old marketplace apps that configure SAML programmatically.","solutions":["Remove all Meteor.call('addSamlService', ...) calls from your client code — the method is a no-op stub.","Configure SAML providers through the admin UI or the SAML_Custom-* settings (Admin -> SAML -> add provider), which the server reads via addSettings()/settingsRegistry and SAMLUtils.setServiceProvidersList.","If you automated SAML setup via scripts, rewrite them to write the SAML_Custom-<Name>-* settings documents (Settings collection / settings REST API) instead of calling the method.","Audit logs after upgrade to confirm no other deprecated SAML entry points are still being hit."],"exampleFix":"// before (legacy, now a no-op that logs a deprecation warning)\nMeteor.call('addSamlService', 'my-provider');\n\n// after: declare the provider via settings (idempotent upsert)\nawait Settings.updateValueById('SAML_Custom-my-provider_entry_point', 'https://idp.example.com/saml');\n// ...or use the Admin UI: Administration -> SAML -> New Provider","handlingStrategy":"validation","validationCode":"// Before automating SAML setup, check whether the method still does work\n// (post-refactor it only warns). Prefer settings-based configuration:\nconst providerExists = await Settings.getValueById('SAML_Custom-my-provider_entry_point');\nif (!providerExists) {\n  await Settings.updateValueById('SAML_Custom-my-provider_entry_point', 'https://idp.example.com/saml');\n  // ...set the remaining SAML_Custom-my-provider_* fields\n} else {\n  console.log('SAML provider already configured');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Search your client code and CI scripts for Meteor.call('addSamlService') before every Rocket.Chat upgrade.","Treat any admin method whose name appears in release-note deprecation lists as removed, even if it no longer throws.","Drive SAML configuration exclusively through the SAML_Custom-* settings or the admin UI."],"tags":["saml","deprecation","meteor-methods","authentication","settings"],"backgroundTag":"deprecated-api-call","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}