How to create a new user inside an external Crowd directory from Confluence?


I am developing a confluence plugin where an authorized user can create new users in confluence. The new users should be stored inside an external crowd directory and not inside the internal confluence user directory.

I tried using the interface CrowdService ( When I use the ImmutableUser.Builder() to create a new user with the id of the external directory and add that user via the addUser(User user, String credential) method of CrowdService, the user is allways created inside the internal confluence directory, no matter which directory id the user has.

What am I doing wrong or is there another way to archive this? The only other solution I found so far, is to use the CrowdClient ( But there I have to sync the directory manually after creating the user and it doesn’t look like a “clean” solution.

1 Like