Preserve User Profiles When Cloning to a Different Identity Provider

Last modified by Eleni Cojocariu on 2026/08/11 18:36

Steps

When the target instance of a clone authenticates against a different identity provider than the source — or against the same provider with a different client configuration — the external identities recorded on the copied user profiles match nothing. To keep returning users on the profile they already have:

  1. Export the user profiles of the target instance that are linked to an external identity, before cloning it: one at a time with Export a Page, or together with Export Content in XAR format.
  2. Clone the instance by following Clone an XWiki Instance, which keeps the target instance's own authentication settings rather than the source's.
  3. Reconnect the copied profiles to the target instance's identity provider, in one of two ways:
    • Import the profile pages exported in step 1, which restores the identity data the target instance had recorded.
    • Edit that identity data in the database instead.
  4. Log in on the target instance as a user the identity provider authenticates, and check that they reach the profile they already had, with no second profile created for them in the user index.

FAQ

Which users does this concern?

Only the users an external identity provider authenticates. A user whose password is stored in their own profile is matched by user name and is unaffected.

Is exporting and importing better than editing the database?

Both reach the same result. Exporting and importing uses nothing but the wiki's own tools; editing the identity data in the database saves the re-import but needs direct access to it.

Why not copy the authentication settings like every other setting?

The target instance would then authenticate its users against the source's identity provider, which is exactly what a separate environment is meant to avoid.

Related

Get Connected