How to add a user via RestAPI that is activated without confirming the invitation email

For integration tests I want to create users on the fly, create requests and comments, then delete them again. The comments create a problem via rest API, because with the endpoint /rest/servicedeskapi/request/{issueId}/comment I need to actually log in a user with basic authentication in order to let him create a comment. I didn’t find ‘raiseOnBehalfOf’ like in /rest/servicedeskapi/request endpoint. But when I create users with endpoint /rest/api/2/user then an email is sent to the new user, and until he accepts the invitation I cannot use his username to create a comment via Rest API (401 response). A call to GET /rest/api/2/user says that he is active, and there are no apparent differences to another user who can.

Is there a way to create users that immediately can be used?

nope. [JRACLOUD-67024] User created via REST API receives invitation email - Create and track feature requests for Atlassian products.