REST Api - user/create set group (camunda-spring-boot - add initial user)

Hello,

I am trying to build (modify) a camunda spring boot example for a show case and want to have users in the system when I start up.
I don’t want to get forwarded to:
http://localhost:8080/app/admin/default/setup/#/setup
but want to login immediately.

So I created a user via the rest api (https://docs.camunda.org/manual/7.5/reference/rest/user/post-create/#parameters) but I am still forwarded to this initial user creation page and can’t use the login directly.
I suppose the reason is that my created rest api user is not assigned to a group.

Is there a REST api to add the user to the group?
Is there an easier way to hook in somewhere in Java to add this users? Of course best would be some spring (boot) api to easily add the user.

Thanks
Tim

Hi Tim,

you’re forwarded to this site because no admin account exists. See the User Guide for details.

You can also have a look at the Invoice example which creates user and demo data on startup.

Best regards,
Philipp

Additionally, even if this doesn’t solve you’re problem directly, there is an endpoint at PUT /group/{id}/members/{userId} to add a user to a group.

Thanks a lot both of you for that fast reply.
Now I got my spring boot example running.

    @Autowired
    private ProcessEngine processEngine;

    @PostConstruct
    public void createUsers() {
        new DemoDataGenerator().createUsers(processEngine);
    }