How Matrix Authentication Service changes user and session management
Once a Synapse deployment delegates logins to Matrix Authentication Service (MAS), account administration no longer happens in Synapse alone. MAS is an OAuth 2.0 and OpenID provider for Matrix that implements the OIDC-based authentication described in MSC3861. It does not hold your identity itself: it passes sign-in to upstream OpenID Connect providers such as Keycloak, Microsoft Entra ID, Google and Authentik. Teams that adopt MAS need to decide who now manages passwords, admin rights and personal sessions, because those tasks move to MAS. Administration is handled through the MAS Admin API and the MAS command line interface, which the MAS reference documentation covers alongside configuration and supported scopes. Confirm the exact MAS version you run against that documentation before writing any automation, since the endpoints and CLI commands are version-specific.
You will need this capability in two situations. The first is planned: when your team adopts MAS, every operational task that used to call Synapse's user endpoints needs an owner and a replacement path. The second is often discovered late: when existing Synapse admin scripts start failing after the switch because the endpoints that created users, reset passwords or changed admin flags no longer serve those functions. Inventory your scripts, cron jobs and helpdesk runbooks before cutover and mark each call as moved to MAS, moved to the upstream identity provider, or retired. Also check which accounts were created as local Synapse users and which come from upstream sign-in, since that determines where a password reset or account disable must happen.
Before you rely on MAS for sessions, verify three things in a test environment: how the MAS Admin API authenticates your automation, which account or client holds administrative permissions, and whether a revoked upstream account also ends its MAS sessions. Ask your MAS deployment partner or the MAS documentation how each action is audited, because the audit trail for an admin change may sit in MAS rather than in Synapse logs. Keep the admin credentials for MAS in your secrets store, scoped to the minimum actions your scripts need, and rehearse a revoked-access test so you know a leaver's personal sessions end when your identity provider disables them.
How logins, tokens and admin actions flow between MAS, Synapse and the upstream provider
The diagram starts with a Matrix client that sends the user to MAS, which hands sign-in to the upstream OpenID Connect provider. MAS then issues tokens, and the client presents them to Synapse, which accepts MAS-issued tokens instead of checking passwords itself. The operator's MAS CLI or Admin API sits inside the trust boundary, so check who can reach it and which accounts it can change. This is a simplified view of the flow.
Simplified view of login, token and admin paths between MAS, Synapse and the upstream provider.
Which admin surface handles each account task
This table compares the MAS CLI, the MAS Admin API, the upstream identity provider console and the remaining Synapse admin endpoints across common account tasks. Read each row as a question of who should own the task and which surface fits it, then confirm current commands and endpoints against the MAS reference for your version.
| Account task | Primary surface | Who should hold access | When it fits |
|---|---|---|---|
| Reset or set a local password | MAS CLI for local accounts; not applicable to users authenticated only by upstream SSO | Server operators with host access | Break-glass recovery or a scripted fix on the MAS host, with the change logged in your runbook |
| Grant or revoke server admin rights | MAS CLI or MAS Admin API, depending on the version you run | Platform administrators only, a small named group | Promotion or demotion of a named account; confirm the exact command or endpoint in the MAS reference first |
| End a personal session or device | MAS Admin API for session revocation, with user self-service where enabled | Service desk for user requests; the user for their own sessions | Lost device, suspected token theft or a leaver; revoke sessions before disabling the upstream account |
| Deactivate an account | MAS Admin API or CLI, with the upstream identity provider disabled as the authoritative step | Identity team and HR offboarding owners | Leavers and compromised accounts; confirm how MAS treats upstream-linked accounts in your version |
| Change identity attributes such as email or display name | Upstream identity provider console, synced into MAS at login | Identity provider administrators | Any attribute owned by the corporate directory; avoid editing these in MAS or Synapse directly |
| Enforce MFA or password policy | Upstream identity provider policy | Identity provider administrators and security team | Controls that belong to the directory for all applications, not to Matrix alone |
| Remaining Synapse admin endpoints for users | Synapse Admin API for tasks MAS does not yet cover; confirm each endpoint against your Synapse version | Restricted admin accounts on the server host or internal network | Only where the task is still served by Synapse after MAS is in place; disable any endpoint MAS now owns |
| Audit who changed what | Server logs from MAS and Synapse, forwarded to your central log platform | Security operations and compliance reviewers | Evidence for access reviews; confirm which events each component records in your version |
Which Synapse endpoints stop working once MAS is in place
Once Matrix Authentication Service handles sign-in, Synapse no longer owns password checks, and that changes which account administration calls still work. Any call that assumed Synapse held the credential, such as setting a password, creating a user with a password, or acting on a session that Synapse used to issue itself, has to be re-planned against MAS. Treat this as a change of owner, not a deletion: the business task usually still exists and needs a supported path through MAS or through your identity provider. Before cutover, ask the team that deploys Synapse to confirm the exact endpoints affected in your Synapse version, because the list depends on your configuration and release.
Start with an inventory. List every script, cron job, runbook, helper bot and ticket macro that calls the Synapse Admin API or touches Synapse-local accounts, including the ones run by people outside the platform team. Check each entry against the Synapse upgrade notes and the MAS documentation for the MAS-side integration, and mark each as unchanged, replaced, or dependent on a decision. Synapse's own release history also matters here: the GitHub releases page is where you confirm which release you are running before you trust any note about it.
For each replaced call, name the new owner of the task before you write code. Password resets and admin rights move to MAS through its Admin API and command line interface, while user lifecycle and identity changes should follow your identity provider. Decide who may perform each action, how the action is logged, and how a failed step is detected and rolled back. A script that silently returns an error after cutover is a larger risk than one that is visibly removed, so test each replacement against a staging account, record the result, and retire the old script only after the replacement has passed.
Where password, admin rights and session tasks move in Matrix Authentication Service
Once MAS handles login, many account tasks that operators used to run against Synapse move to MAS, its Admin API, its command line interface or the upstream identity provider. The cards below map each task family to its new home and list what to confirm in the MAS reference documentation for your version before you rely on it.
Password changes
Under MAS, the password is no longer stored or verified by Synapse, so a reset issued through the old Synapse path will not reach the account that signs in. Decide first whether passwords live in MAS's own store or in an upstream provider such as Keycloak or Entra ID. If the upstream provider owns the credential, the change belongs there, and MAS-side admin commands may not apply. Confirm which path your MAS version supports for each case in the MAS reference documentation.
MAS docsUser creation and deactivation
Account creation and deactivation are handled through the MAS Admin API or the MAS CLI, and the upstream provider usually remains the source of truth for who may sign in. Check whether a user created in MAS is linked to an upstream identity, how deactivation interacts with existing Synapse sessions, and whether the Synapse account state is kept in step. Test the full path with a disposable account before you script it for leavers.
Admin rights
Server admin status is set in MAS rather than by flags in the Synapse database, so granting or removing admin access needs a MAS-side step. Confirm the exact command or Admin API call for your version, how the admin flag reaches Synapse, and how quickly a revoked admin loses access. Keep the list of admins in version control or your identity system so the grants stay reviewable.
Personal session review
Users can review and end their own sessions through the MAS account pages, which lists the devices and browser sessions tied to their login. Operators should confirm what a user can see and end on their own, and what appears in the MAS Admin API for other accounts. Check which session identifiers the Admin API returns, so that a security review can match a suspicious session to an account.
Forced sign-out
Forcing a user out of every session is a containment step after a compromise or an offboarding, and it has to end MAS sessions as well as Synapse devices. Confirm whether the MAS Admin API or CLI can end all sessions for one user in a single call, and whether access tokens already issued stay valid until they expire. Test the sequence on a test account and record how long it takes effect.
Device handling
Matrix devices still exist after MAS takes over login, but their creation and removal are tied to the sessions MAS issues. Decide whether stale devices are removed through MAS, through the Synapse Admin API, or both, and document the order. Confirm which endpoints still accept device operations after MAS is enabled, because some Synapse endpoints stop working once MAS owns authentication.
Matrix Authentication Service setup steps for account administration
This sequence moves account administration from Synapse to MAS in a deliberate order, so that passwords, admin rights and sessions are managed through one tested path before operators change their runbooks. Each step closes with a check the team can repeat.
Confirm the MAS configuration and upstream provider
The platform engineer reviews the MAS configuration file against the MAS configuration reference and confirms the upstream OpenID Connect provider (for example Keycloak, Microsoft Entra ID, Google or Authentik) is registered with a client that matches the redirect URIs MAS expects. Confirm the exact configuration keys in the MAS documentation and the upstream identity provider setup guide, not from memory or older examples. Done when a login through the upstream provider completes in a test browser and MAS shows the expected identity mapping. If your identity provider uses SAML or LDAP only, confirm a bridge such as Dex is in place, because MAS does not support SAML directly.
Register MAS as the authentication source for Synapse
The Synapse administrator updates the Synapse configuration so that Synapse delegates authentication to MAS, following the MSC3861 integration steps in the MAS documentation. Synapse must hold the shared secret and endpoint settings that MAS publishes, and the configuration should be validated before restart. Confirm the exact keys in the MAS documentation and the Synapse configuration manual. Done when Synapse starts cleanly, a client can sign in through MAS, and the Synapse log shows no errors about the authentication provider.
Create a dedicated admin identity for MAS
The identity administrator creates one named admin account in the upstream identity provider for the people who will use the MAS Admin API and CLI, and grants it only the group membership needed for MAS administration. Avoid sharing a single operator login. Record which accounts hold this role in your access register. Done when the admin account can sign in to MAS through the upstream provider and no unrelated user group has been given administration rights in MAS.
Restrict access to the MAS Admin API
The platform engineer limits who and what can reach the MAS Admin API. Keep the listener on an internal address, place it behind network rules that allow only the operator hosts, and require the admin credential described in the MAS reference before any call succeeds. Confirm the listener and credential settings in the MAS configuration reference. Done when a request from an approved operator host succeeds and the same request from any other host, including a client network, is refused.
Configure the MAS CLI on the MAS host
The MAS operator installs or confirms the MAS command line interface on the MAS host, points it at the same configuration file the service uses, and runs it under a named operator account rather than a shared root session. Check the command reference in the MAS documentation for the subcommands that set passwords, grant or revoke admin rights and manage personal sessions. Done when the CLI lists its help output and reads the configuration without errors, and the shell history or audit trail identifies the operator who ran each command.
Test password, admin and session actions on a test user
The operator creates or selects a non-production test user and runs each action the runbook will depend on: a password reset, granting and revoking admin rights, and ending one personal session. After each action, the operator signs in or checks the session list to confirm the result in a client. Record the commands and outputs in the test log. Done when every action produces the expected state change on the test user, and a failed action has a documented fix before any production account is touched.
Update runbooks, scripts and offboarding procedures
The operations lead replaces every Synapse-side account procedure that MAS now owns with the MAS equivalent, including password resets, admin flags, device handling and offboarding steps. Scripts that call Synapse account endpoints are reviewed and either retired or rewritten, and the change is reviewed by the security owner. Confirm which Synapse endpoints no longer apply to MAS-managed accounts by checking the MAS and Synapse documentation for your version. Done when the runbook lists only MAS procedures for account administration, each script has an owner, and a dry run of the offboarding procedure on the test user completes end to end.
Security and operational considerations for MAS administration
Once MAS owns account administration, the Admin API credentials, the admin interface and the audit trail become the main controls on the server. The cards below are decisions to make and checks to run before MAS administration is handed to a team, and they connect because a weakness in one (for example, a shared admin credential) affects all the others.
Who holds Admin API credentials
Every MAS admin call, from password resets to granting admin rights, runs with a credential that can change any account. Decide which named people and which automation jobs may hold it, and where it is stored, such as a secrets manager rather than a shell history or a shared script. Confirm how the credential is rotated after staff changes and whether it can be scoped to fewer actions. Illustrative example: a script on a build server that holds a broad token is a wider exposure than a single operator's session.
MAS docsNetwork exposure of the admin interface
The MAS Admin API should be reachable only from the administration network or hosts that need it, not from the public internet alongside the client-facing listeners. Decide which listener serves the API, how the reverse proxy routes to it, and which firewall rules apply. Confirm by testing from an outside network that the admin path is unreachable, and record the result as evidence for your security review.
Audit trails across MAS and upstream
An admin action can touch MAS, the upstream identity provider and Synapse, and each keeps its own logs. Decide where MAS logs are shipped, how long they are kept, and who reviews them. Map which event proves an account was disabled, which proves a session was ended, and which proves an admin right changed. Confirm that the upstream provider keeps records of its own sign-in and account changes, since MAS alone will not show the full picture.
Session revocation and offboarding timing
Ending a leaver's MAS sessions and disabling the account are separate steps, and the gap between them is a window of access. Decide the order: disable the upstream account first, then end personal sessions through MAS, then confirm that devices stop syncing. Confirm how long existing access tokens remain valid in your configuration, and test the sequence on a test account before relying on it for offboarding.
Single admin identity risk
If one person or one service account holds all admin rights, a lost credential or an absent administrator blocks password resets, role changes and session cleanup. Decide at least two named administrators who can each perform the critical actions, and document a break-glass procedure stored outside the chat platform. Confirm that the break-glass account is tested periodically and protected by strong authentication.
Keeping MAS and Synapse in step
MAS and Synapse must agree on the MAS-related configuration and API behavior, so upgrading one without the other can break logins or admin calls. Decide who owns each upgrade, read the upgrade notes for both components before each change, and test in a staging environment that mirrors your identity provider setup. Confirm the currently supported Synapse release line in the upgrade notes before scheduling work.
Synapse upgrade notesWhat to confirm for your deployment model
When your team installs Synapse and MAS directly, you own the MAS configuration file, the upstream identity provider setup and the process that runs the MAS command line interface and Admin API. Nothing is preconfigured for you, so every limit is a decision you need to record.
- Upstream providers: Confirm which OpenID Connect providers your environment can reach and register with, such as Keycloak, Microsoft Entra ID, Google or Authentik. Check the provider list in the MAS documentation against what your identity team already operates.
- SAML sources: MAS does not support SAML directly. If your directory only speaks SAML, plan a bridge such as Dex and confirm who operates it and who owns its certificates.
- Synapse coupling: Confirm that Synapse is configured to delegate authentication to MAS, and that the endpoints you planned to use for account changes still answer after the switch.
- Admin tooling access: Confirm which hosts may run the MAS CLI and call the Admin API, and whether your change process allows operators to use them directly.
- Upgrade ownership: Confirm who tracks MAS releases and reviews its configuration changes.
Confirm each item against your own environment and the current MAS reference before you write runbooks.
Element Server Suite deploys Synapse, MAS and related services on Kubernetes with Helm charts, and it packages MAS configuration inside those charts. Your team works through chart values and cluster secrets rather than editing MAS files on a host, which changes who can make which change and how.
- Configuration exposure: Confirm which MAS settings the ESS chart exposes as values and which you would need to override or patch. Ask the vendor to document this for your chart version.
- Edition fit: Confirm which ESS edition applies to your use. ESS Community is intended for non-professional deployments and evaluations, while ESS Pro covers professional and government use.
- Identity sources: Confirm which upstream providers your cluster can reach, and whether LDAP and SCIM integrations in ESS cover the directory you use.
- Admin tooling access: Confirm whether operators may exec into the MAS pod to run the CLI, and whether that access is logged and limited to named roles.
- Secrets and upgrades: Confirm where client secrets live, who rotates them, and how chart upgrades are tested before they reach production.
Confirm the chart version and exposed values with the vendor before you commit to an admin workflow.
Whichever deployment model you choose, the admin tools for password resets, admin rights and personal session cleanup carry the most risk. This tab covers the permissions and approval questions that sit above the packaging, so the same questions apply to both models.
- Who may act: Confirm which roles may call the MAS Admin API or run CLI commands that change passwords, grant admin rights or end sessions.
- Approval and logging: Confirm whether changes need a ticket, a second approver or an audit trail, and where those logs are kept.
- Automation scope: Confirm whether scripts may run from a central host, and which service accounts and tokens they use.
- Break-glass path: Confirm how an administrator regains access if the upstream identity provider is unavailable.
- Data handling: Confirm how exported session or account data is stored and who may read it.
Agree these rules with your security and compliance owners before the first production change.
Questions teams ask before moving Matrix Authentication Service administration
How much more effort is MAS user administration than the Synapse Admin API?
Expect a different workflow rather than a simple swap, because MAS takes over credentials, admin rights and personal sessions that Synapse previously handled. Once MAS is the authority, password resets, admin flags and device sessions go through the MAS Admin API or the MAS command line interface, and some Synapse endpoints stop working. The effort depends on how many scripts, runbooks and helpdesk steps call Synapse directly, and on whether your team already works with OAuth 2.0 and OpenID Connect concepts. Read the MAS reference documentation on the Admin API and CLI to size the change against your current task list before you commit to a plan.
Can our own team carry out the MAS cutover without a partner?
Often yes, if your team already runs Synapse and has someone who can operate an identity provider. The cutover touches the homeserver configuration, the upstream identity provider, user records and any automation that creates or disables accounts, so it benefits from a written test plan and a rollback plan. Teams without an in-house identity engineer, or with many custom scripts, usually find the verification and rollback work is where time goes. Ask a partner for a written scope that lists which steps they run and which you keep, so the division of work is clear before anyone changes production.
What do we need from our identity and Matrix staff during the cutover?
You need three inputs: someone who owns the upstream identity provider, such as Keycloak, Microsoft Entra ID, Google or Authentik, someone who owns the Synapse homeserver and its configuration, and someone who can approve changes to user access. The identity owner confirms claims, group mapping and how accounts are disabled at the source. The Matrix owner confirms the server name, the database and the endpoints that will change. Access approvers confirm who keeps admin rights. If your upstream provider only speaks SAML or LDAP, MAS does not support SAML directly, so plan a bridge such as Dex and include its owner in the staffing list.
How long does a MAS cutover take?
No duration is published for this work, so ask any provider for a written estimate that names the phases, the people needed and the assumptions behind them. The length depends on the number of user accounts, the identity provider setup, how many admin scripts you have, the test environments available and how many change windows your organization allows. Ask for the estimate to list what happens before the cutover, during it and after it, including verification and the rollback path, because those phases often take longer than the switch itself.
What drives the cost of moving MAS administration up or down?
The main cost drivers are the number of identity providers and their complexity, whether SAML or LDAP needs a bridge, the number of existing Synapse admin scripts that must be rewritten, the size of the user base, and how many environments need testing before production. Costs also rise with compliance evidence requirements, such as keeping records of who changed admin rights and when. Costs fall when identity is already standardized, scripts are few and documented, and a test environment mirrors production. Any quote should separate one-time work (design, configuration, migration, testing) from recurring work (operating the identity provider, reviewing admin rights, upgrades).
Can our existing Synapse admin scripts be reused after MAS is in place?
Some parts can be reused, but scripts that call Synapse endpoints for passwords, admin flags or device management need review because those endpoints stop working once MAS owns the account. Start with an inventory: list each script, the endpoint it calls, the account type it affects and who runs it. Scripts that only read data or manage rooms may need little change, while scripts that manage credentials or sessions usually need rewriting against the MAS Admin API or CLI. Test each rewritten script against a copy of production data before it runs against live accounts, and keep an audit trail of every change.
What security checks should we run after switching user management to MAS?
Check that admin rights are granted only to the accounts that need them, that personal sessions can be listed and revoked by the right people, and that disabling a user at the identity provider removes access to Matrix. Confirm that password management no longer happens through Synapse endpoints that are now unavailable, and that scripts run with the least privilege they need. Review the MAS configuration and the upstream identity provider settings against your own access policy, and keep a record of the tests so your compliance or security team can review them later.
How DeployOpen scopes and delivers MAS user and session management
DeployOpen plans, builds, documents and supports MAS account administration inside your own infrastructure. The work covers how admin rights, password resets and personal sessions move from Synapse to MAS, with the Admin API and command line interface wired into your identity provider and operating runbooks.
How we scope
- Engagements are fixed-scope, with the MAS admin tasks, roles and deliverables agreed in writing before work starts
- Scope lists which Synapse admin endpoints are retired, which are replaced by MAS equivalents and who owns each task
- Upstream identity provider, session lifetimes and admin role mapping are confirmed with your security team at scoping
How we build
- Configure MAS admin access, scoped API credentials and the command line interface on servers you control
- Build scripts or runbooks for password resets, admin rights and personal session revocation, then test each one
- Verify that Synapse-facing clients and bots no longer depend on endpoints MAS has taken over
How we hand over
- Deliver written runbooks for each account task, with the MAS command, the expected result and the rollback step
- Document the admin credential custody model, access list and audit trail your compliance team will review
- Walk your administrators through the procedures and confirm the handover checklist is signed off in writing
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, scoped to your MAS release
- Retainer work can re-check admin endpoints and scripts after each planned MAS or Synapse upgrade
- Ask for the support boundaries, response arrangements and upgrade responsibilities in the written quote

