RocketChat/Rocket.Chat · warning
Adding SAML service is deprecated
Error message
Adding SAML service is deprecated
What it means
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.
Source
Thrown at apps/meteor/server/lib/saml/lib/settings.ts:166
}
const service = await LoginServiceConfiguration.removeByService(serviceName);
if (!service) {
return false;
}
void notifyOnLoginServiceConfigurationChanged({ _id: service._id }, 'removed');
return false;
}),
)
).filter((e) => e) as IServiceProviderOptions[];
SAMLUtils.setServiceProvidersList(providers);
};
export const addSamlService = function (name: string): void {
SystemLogger.warn({
msg: 'Adding SAML service is deprecated',
serviceName: name,
});
};
export const addSettings = async function (name: string): Promise<void> {
await settingsRegistry.addGroup('SAML', async function () {
await this.with(
{
tab: 'SAML_Connection',
},
async function () {
await this.add(`SAML_Custom_${name}`, false, {
type: 'boolean',
i18nLabel: 'Accounts_OAuth_Custom_Enable',
public: true,
alert: 'Premium_required_from_9_0_0_alert',
});View on GitHub (pinned to b2c16d5842)
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.
Example fix
// before (legacy, now a no-op that logs a deprecation warning)
Meteor.call('addSamlService', 'my-provider');
// after: declare the provider via settings (idempotent upsert)
await Settings.updateValueById('SAML_Custom-my-provider_entry_point', 'https://idp.example.com/saml');
// ...or use the Admin UI: Administration -> SAML -> New Provider Defensive patterns
Strategy: validation
Validate before calling
// Before automating SAML setup, check whether the method still does work
// (post-refactor it only warns). Prefer settings-based configuration:
const providerExists = await Settings.getValueById('SAML_Custom-my-provider_entry_point');
if (!providerExists) {
await Settings.updateValueById('SAML_Custom-my-provider_entry_point', 'https://idp.example.com/saml');
// ...set the remaining SAML_Custom-my-provider_* fields
} else {
console.log('SAML provider already configured');
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/10599d85ee6ceb14.
Report an issue: GitHub.