startUserId is always null

When I pull history/process-instance, I always get a null startuserID.
image

I do claim each task for a user. Is there anything I am missing? Do I need a call to set the user when I start the process_definintion? I don’t see any parameter for startUserId.

Thanks

Hi @lenny_h,

to set the startUserId in the database you have to call identityService.setAuthenticatedUserId() before you start the process instance.

If you use the REST api, activate the authentication removing the comment in the web.xml: https://docs.camunda.org/manual/7.12/reference/rest/overview/authentication/.

Hope this helps, Ingo

1 Like

Hi @lenny_h,

The only exception where no required action is if you start the process from the tasklist app where the startUserId would be set automatically.