Unable to create new user in specific directory by default user is creation in the top most directory and I am running this code in script runner console
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def userService = ComponentAccessor.getComponent(UserService)
UserService.CreateUserRequest createUserRequest = UserService.CreateUserRequest.
withUserDetails(user, "xyz", "password", "email@example.com", "xyzz")
createUserRequest.inDirectory(1234567) //I have mentioned the directory id from crowd //details ex: Directory 3: Directory ID: 1234567
UserService.CreateUserValidationResult result = userService.validateCreateUser(createUserRequest)
Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events