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 (https://docs.atlassian.com/DAC/javadoc/embedded-crowd-api/2.3.4/reference/com/atlassian/crowd/embedded/api/CrowdService.html). 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 (https://bitbucket.org/atlassian/crowd-rest-client). But there I have to sync the directory manually after creating the user and it doesn’t look like a “clean” solution.