Suppose you have created a service user and mapped it to your bundle like in [1]. The code snippet should work for you. Session session =repository.loginAdministrative(repository.getDefaultWorkspace());UserManager uMgr = ((org.apache.jackrabbit.api.JackrabbitSession)session).getUserManager();..........