diff --git a/backend/helpers/kratos_user.py b/backend/helpers/kratos_user.py
index e1540368bdb0a44d0754331a7acbe1a0df31265d..d5f50d1120713a85c2444cb4892c7c4e8fc8398b 100644
--- a/backend/helpers/kratos_user.py
+++ b/backend/helpers/kratos_user.py
@@ -387,6 +387,16 @@ class KratosUser():
             "preferred_username": username,
             "email": self.email,
             "stackspin_roles": roles,
+            # We use this in Nextcloud because the `oidc_login` app wants a
+            # boolean flag saying whether the user should have admin
+            # privileges.
+            "is_admin": "admin" in roles,
+            # This is also for Nextcloud specifically: we used to use the
+            # `social_login` app for OIDC, which prefixed all user IDs with
+            # `stackspin-`. We need to stay compatible with that naming scheme
+            # until we figure out if and how we want to migrate those prefixes
+            # away.
+            "stackspin_prefixed_uuid": "stackspin-" + self.uuid,
         }
 
         if app == "wekan":