Use Single Sign-On

Last modified by Eleni Cojocariu on 2026/11/18 13:17

Steps

Sign agents in through your organization's identity provider by making its authenticator the fallback of the Token Authenticator. Users then allow an agent with their single sign-on account, and the agent acts as their wiki user (see MCP User Permissions).

  1. Install the OpenID Connect Provider extension and the authenticator for your identity provider, and configure that authenticator for your identity provider, for example the OpenID Connect Authenticator.
  2. Open "Users & Rights > Authentication" and set the authenticator to "Token based authenticator".

    The Authentication service administration section, with Token based authenticator highlighted in the list of authentication services

  3. Set your identity provider's authenticator class as the fallback in xwiki.properties, then restart XWiki. For the OpenID Connect Authenticator:
    oidc.token.authenticator=org.xwiki.contrib.oidc.auth.OIDCAuthServiceImpl
  4. Open "Users & Rights > OpenID Connect" and set the clients to "Dynamic mode", or keep "Static mode" and register each client.

    The Clients part of the OpenID Connect administration section, with the Dynamic mode option highlighted and selected

  5. Connect an agent and check that the browser opens your identity provider's login page, then the wiki's consent screen.

    The consent screen the wiki shows the connecting agent, listing what the client is requesting access to, with the Accept button highlighted

FAQ

Which class do I set for another authenticator?

The class its documentation gives for the xwiki.authentication.authclass property of xwiki.cfg. It is a class name, not the name the "Authentication" section shows.

Why not select the identity provider's authenticator directly?

Only "Token based authenticator" accepts the tokens the wiki issues to agents, so the MCP endpoint offers the browser sign-in only while it is selected. The MCP administration section warns when another authenticator is selected.

The first sign-in fails with "There is no OpenID Connection information in the current session (anymore?)". What should I do?

Upgrade XWiki to 17.4.10, 17.10.4, 18.1.0 or later, where this is fixed. On an earlier version it happens when the browser has no session on the wiki yet, and starting the sign-in again from the client works.

Does disabling a user in the identity provider revoke their agents?

No. Tokens issued to agents do not expire, and the wiki checks them without asking the identity provider. Delete the user's tokens in the "Applications" section of their user profile, which requires programming rights when it is not your own profile.

Can an agent use a token issued by the identity provider?

No. The MCP endpoint accepts only tokens issued by the wiki's OpenID Connect Provider.

Related

Get Connected