Following the recommendations here, How to create user programatically in jira plugin - #4 by dchouksey89 I’ve tried to create a service user on plugin installation, and receive an validation error creating user: You do not have permission to create a user.
on the validation call:
ApplicationUser loggedInUser = authenticationContext.getLoggedInUser();
UserService.CreateUserRequest createUserRequest = UserService.CreateUserRequest.withUserDetails(loggedInUser, "serviceUser", password, "support@example.com", "Jira Server Plugin");
UserService.CreateUserValidationResult validationResult = userService.validateCreateUser(createUserRequest);
Collection<String> errorMessages = validationResult.getErrorCollection().getErrorMessages();
for (String errorMessage : errorMessages) {
log.error("validation error creating user: " + errorMessage);
}
Am I missing a step? Is there some permission that needs to be granted in the plugin descriptor somehow?
Using latest SDK, 8.0.16, developing against the pre-bundled Jira instance, version 7.13.0
.